That was terribly simple after all the frustration I've had over the last few days.
Now you know that wizard shows that message for a reason. As long as you don't mix & match CRT, you should not see these errors.
For the time being, that will certainly get me started, but, if I dare ask, what steps do I need to take to use static CRT mode?
To build wxwidgets with static CRT, you need to do the following. In Visual Studio click
Project -> Properties -> Configuration Properties -> C/C++ -> Runtime Library & select
Multi-threaded/Multi-threaded Debug option. Click OK to close dialog. Do this for all projects.
Alternatively in the command prompt add the following to compile it with static CRT.
nmake /f makefile.vc RUNTIME_LIBS=static <Other Options>
Is there any way I can check if the static libraries are there?
You can check it by issuing following command
D:\Projects\Test1\Debug>dumpbin /all Test1.lib | find /i "/DEFAULTLIB"
00000000: 20 20 20 2F 44 45 46 41 55 4C 54 4C 49 42 3A 22 /DEFAULTLIB:"
/DEFAULTLIB:MSVCRTD
/DEFAULTLIB:OLDNAMES
D:\Projects\Test1\Debug>
As you can see this shows static library
Test1.lib is dynamically linked against MSVCRTD.lib. In this case if you want to link any app against
Test1.lib you have to use
/MTd as compiler and linker option.
When
Test1.lib is linked against static MSVC runtime, it will show
libcmt[d].lib in output.