These errors are due to the way the runtime is compiled into the code...
msvcrt.lib = stub for the Multi-threaded DLL version
libcmt.lib = static multitheaded runtime lib
Unlike other libs, the compiler tags eachobject file/library with the runtime version. if you try linking several libs which use different runtime versions, then they clash.
The solution is to make sure ALL the libs you build with use the same settings.
However, when linking to pre-built libs you canot chage the settings. This is what the NODEFAULTLIB stting is for.
Try '/NODEFAULTLIB:msvcrt.lib' which should let it use the LIBCMT.lib version (static) only.
PS: From the errors it looks like you have the run-time type info setting on. Unless you use dynamic_cast (which is naughty) then you can disable this in all the various builds.
Making Visual C++ Express code work (was whirly particles)
I'd tried that already, I added msvcrt.lib to the ignore specific library field and got this:
Code: Select all
Generating Code...
Linking...
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol _exit imported in function _main
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol _strrchr imported in function _main
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol __iob imported in function _ShowError
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol _fgetc imported in function _cleanup_output
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol _fclose imported in function _cleanup_output
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol _setvbuf imported in function _WinMain@16
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol __pctype imported in function _ParseCommandLine
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol ___mb_cur_max imported in function _ParseCommandLine
SDLmain.lib(SDL_win32_main.obj) : warning LNK4217: locally defined symbol __isctype imported in function _ParseCommandLine
SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__strncpy referenced in function _main
SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _ShowError
SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__remove referenced in function _cleanup_output
SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__fopen referenced in function _cleanup_output
SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__setbuf referenced in function _WinMain@16
SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp__freopen referenced in function _WinMain@16
SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol __imp___getcwd referenced in function _WinMain@16
C:\Documents and Settings\blah\.exe : fatal error LNK1120: 7 unresolved externalsI've looked through the settings and can't find any info about that.Mr Dom wrote: PS: From the errors it looks like you have the run-time type info setting on. Unless you use dynamic_cast (which is naughty) then you can disable this in all the various builds.
That looks like its not linking any run time lib at all.
Make sure all the projects have the multithreaded flag set (/MT), the only lib in the ignore list is the msvcrt.lib (NOT libcmt.lib)
If you have the SDL source then try rebuilding this.
For debug builds, you need /MTd, release builds /MT.
To specify the DLL version in command line, it is /MDd (debug) and /MD
(release). make sure you dont have both though!
The Run time type stuff (RTTI) is the flag /GR in VC6, so probably the same for the express. If its there, you should be able to remove it with few problems.
Make sure all the projects have the multithreaded flag set (/MT), the only lib in the ignore list is the msvcrt.lib (NOT libcmt.lib)
If you have the SDL source then try rebuilding this.
For debug builds, you need /MTd, release builds /MT.
To specify the DLL version in command line, it is /MDd (debug) and /MD
(release). make sure you dont have both though!
The Run time type stuff (RTTI) is the flag /GR in VC6, so probably the same for the express. If its there, you should be able to remove it with few problems.

