wxWidgets on old operating system

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

Re: wxWidgets on old operating system

Post by marco_84 » Wed Apr 08, 2020 10:04 pm

Hi doublemax
I took the wx widgets 2.8.12 and compiled them but now I cannot find the wx\prec.h file when I compile minimal.cpp


compiling the wx 3.0.4 I was able to get to the error on the linker the wx3.0.4 folder I had deleted from explorer
what should I do to restore the build without reinstalling all again?
or do I have to reinstall everything?

marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

User avatar
doublemax
Moderator
Moderator
Posts: 14992
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxWidgets on old operating system

Post by doublemax » Wed Apr 08, 2020 10:17 pm

If you managed to compile wx 3.0.4 let's stick with that for now.

I'm not sure if the directory names are different when using visualstudio 6.0, but normally the generated library files are in:
<wxdir>/lib/vc_lib

Check if that directory /vc_lib/ exists. If not which other directories are there at that level?
Check if wxmsw30ud_core.lib exists? If yes, the library path in the project points to a wrong directory. If no, what other files are there. E.g. if there is a "wxmsw30u_core.lib" instead (no d after 30u), then you built only the release version, but not the debug version.
Use the source, Luke!

User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

Re: wxWidgets on old operating system

Post by marco_84 » Thu Apr 09, 2020 6:44 pm

Hi Doublemax

I created version 2.8 and version 3.0 of the wxwidgets but in both versions it doesn't create the library core .lib,

in version 2.8.12 it only creates the library: wxmsw28d_adv.lib

while in version 3.0.4 it creates the libraries: wxjpegd.lib, wxpngd.lib, wxtiffd.lib, wxregexud.lib, wxexpatd.lib, wxzlibd.lib

where is that I'm wrong?

thanks

marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

User avatar
doublemax
Moderator
Moderator
Posts: 14992
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxWidgets on old operating system

Post by doublemax » Thu Apr 09, 2020 7:12 pm

in version 2.8.12 it only creates the library: wxmsw28d_adv.lib

while in version 3.0.4 it creates the libraries: wxjpegd.lib, wxpngd.lib, wxtiffd.lib, wxregexud.lib, wxexpatd.lib, wxzlibd.lib
And there are no errors in the build log? Very strange.

Unfortunately i can't remember VS6 (I'm not even sure if i ever used it). Is it possible that you need to build each library individually?
Use the source, Luke!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2478
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxWidgets on old operating system

Post by PB » Thu Apr 09, 2020 7:18 pm

Assuming you used Build All, I would check the build log. The older VS solutions had an issue and sometimes not all the libraries built properly and one had to hit build the solution few times until all the libraries have been successfully built.

However, it is odd that all the libraries you listed are not the actual wxWidgets libraries but the third party ones used by wxWidgets.

User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

Re: wxWidgets on old operating system

Post by marco_84 » Thu Apr 09, 2020 7:28 pm

Hello everybody

in version 2.8.12 there are no build errors,

I can try to do the single build of the libraries, to do this however I need help on how to do it because I don't know visual C++.

With mingw, msys, gcc and make it was enough to give the commands: ./configure, make and make install and everything was done

thanks for your help

marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2478
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxWidgets on old operating system

Post by PB » Thu Apr 09, 2020 7:45 pm

You can use command line builds with MSVC too, I do it all the time.

E.g., for MSVC6 you could create a bat file like this.

Code: Select all

Prepare the compiler environment
call C:\Program Files\Microsoft Visual Studio\VC98\BIN\vcvars32.bat

REM Replace %WXWIN% with the actual path to if needed, e.g. c:\wxWidgets-3.0.4
cd %WXWIN%\build\MSW

REM static debug configuration
nmake -f makefile.vc 
IF %ERRORLEVEL% NEQ 0 goto FAIL:

REM static release configuration
nmake -f makefile.vc BUILD=release 
IF %ERRORLEVEL% NEQ 0 goto FAIL:

goto SUCCESS:

:FAIL
echo Build failed!
goto :FINISHED

:SUCCESS
Both configurations were built successfully!

:FINISHED
pause
EDIT
I actually checked MSVC6 (on WinXP) and the building using wx.dsw is a bit complicated. By default, it builds only the advanced library. One has to use Batch Build. However, in the batch build there are preselected all combinations of configurations (static/DLL, release/debug), I did not for all the libraries. I did not want to bother with selecting the libraries I wanted, so I just hit Build All.

Unfortunately, wxWidgets 3.0.4 do not build with MSVC6 as the build ends with this error

Code: Select all

c:\Dev\wxWidgets-3.0.4\src\common\datetimefmt.cpp(450) : error C2086: 'p' : redefinition
This is because MSVC6 does not limit the scope of the variable declared in the for loop to that loop only. I remember this issue but I do not know if it can be worked around...

I could build wxWidgets 2.8.12 just fine using Batch Build (there is even more libraries to select as there is not only Universal target but all the libraries also come in Unicode and ANSI variants) but I would not recommend using such an old library...

Post Reply