3.0.3 Static lib build fails on XP/VC10 Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
DaveNadler
Experienced Solver
Experienced Solver
Posts: 53
Joined: Thu Nov 17, 2011 2:13 pm

3.0.3 Static lib build fails on XP/VC10

Post by DaveNadler »

Just installed 3.0.3 on XP with VC10.
SLN fails to load so used NMAKE build.
Documentation says default is debug, non-shared (ie static lib and not DLL) which is what I need.
Unfortunately MAKE creates commands with /MDd instead of /MTd, for example:

Code: Select all

        cl /c /nologo /TP /Fovc_mswud\richtextlib_xh_richtext.obj /MDd /DWIN32
/Zi  /Fd..\..\lib\vc_lib\wxmsw30ud_richtext.pdb  /D_DEBUG /Od /D_CRT_SECURE_NO_D
EPRECATE=1  /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1   /D__
WXMSW__         /D_UNICODE   /I..\..\lib\vc_lib\mswud /I..\..\include  /W4  /DWX
BUILDING /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png  /I..\..\src\
zlib /I..\..\src\regex /I..\..\src\expat\lib /GR  /EHsc /Yu"wx/wxprec.h" /Fp"vc_
mswud\wxprec_richtextlib.pch"    ..\..\src\xrc\xh_richtext.cpp
I tried explicitly adding SHARE=0 to the NMAKE command line without success.
Any Ideas?
Thanks!
Best Regards, Dave

PS: Here's the file I ran:

Code: Select all

cd C:\Program Files\Microsoft Visual Studio 10.0\VC
set WXWIN=c:\wxWidgets-3.0.3
cd %wxwin%\build\msw
nmake /f makefile.vc                SHARED=0
nmake /f makefile.vc BUILD=release  SHARED=0
PPS: To further clarify: I need wxWidgets as a static library, and I'm using the MSVC static library (ie MSVC runtime is linked statically, not DLL).
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 469
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: 3.0.3 Static lib build fails on XP/VC10

Post by New Pagodi »

DaveNadler wrote:To further clarify: I need wxWidgets as a static library, and I'm using the MSVC static library (ie MSVC runtime is linked statically, not DLL).
If you're sure that's what you want to do, the build command would be something like this:

Code: Select all

nmake -f makefile.vc RUNTIME_LIBS=static SHARED=0 <insert other options here>
However, unless you have some specific reason that you need to link with the static c++ libraries, I would advise not doing that.
DaveNadler
Experienced Solver
Experienced Solver
Posts: 53
Joined: Thu Nov 17, 2011 2:13 pm

Re: 3.0.3 Static lib build fails on XP/VC10

Post by DaveNadler »

Sadly I must use static libs.
Thanks Pagodi for the tip on the nmake command line, works fine now!
Post Reply