Linking with 1.1.6 in VC5

I’ve fixed this before but can’t for the life of me get it to work now. When
compiling a bare-bones window, it gives compiler errors about msvcrt.lib and
libcmtd.lib conflicting. So I put /NODEFAULTLIB:msvcrt.lib in the linker
options, and end of with these errors:

Linking…
LINK : warning LNK4049: locally defined symbol “_exit” imported
LINK : warning LNK4049: locally defined symbol “_strncpy” imported
LINK : warning LNK4049: locally defined symbol “_fprintf” imported
LINK : warning LNK4049: locally defined symbol “_fclose” imported
LINK : warning LNK4049: locally defined symbol “__isctype” imported
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__strrchr
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp____p__iob
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__remove
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__fgetc
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__fopen
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__setbuf
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__setvbuf
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__freopen
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp____p___mb_cur_max
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp____p__pctype
Debug/Apprenticeslip.exe : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.

Please help!

Hi,

This is often caused by a difference in the library type used. Check
your project settings under C++ and then the Code Generation drop down.
Make sure you have the same “Use run-time library” selected as was used
to compile the SDL (usually Multithreaded DLL). This should resolve your
problem.

From: owner-sdl@lokigames.com [mailto:owner-sdl at lokigames.com]On Behalf
Of sdl-news at lokigames.com
Sent: Monday, October 30, 2000 9:12 PM
To: sdl at lokigames.com
Subject: [SDL] Linking with 1.1.6 in VC5

I’ve fixed this before but can’t for the life of me get it to work now. When
compiling a bare-bones window, it gives compiler errors about msvcrt.lib and
libcmtd.lib conflicting. So I put /NODEFAULTLIB:msvcrt.lib in the linker
options, and end of with these errors:

Linking…
LINK : warning LNK4049: locally defined symbol “_exit” imported
LINK : warning LNK4049: locally defined symbol “_strncpy” imported
LINK : warning LNK4049: locally defined symbol “_fprintf” imported
LINK : warning LNK4049: locally defined symbol “_fclose” imported
LINK : warning LNK4049: locally defined symbol “__isctype” imported
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__strrchr
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp____p__iob
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__remove
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__fgetc
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__fopen
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__setbuf
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__setvbuf
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp__freopen
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp____p___mb_cur_max
SDLmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol
__imp____p__pctype
Debug/Apprenticeslip.exe : fatal error LNK1120: 10 unresolved externals
Error executing link.exe.

Please help!