Skip to main content
GameDev.net gamedev.net
🔒 Locked

Doh! Linking errors... from my library

Started by PnP Bios Nov 26, 2004 at 12:30 AM 1 replies 400+ views
Original Post
PnP Bios
PnP Bios
--------------------Configuration: hxr_demo_001 - Win32 Debug--------------------
Compiling...
main.cpp
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgheap.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCMTD.lib(strncpy.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in LIBCMTD.lib(isctype.obj)
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
hxr_demo_001.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.

hxr_demo_001.exe - 6 error(s), 1 warning(s)
This is driving me nuts. anybody else have this problem when building their own static libs?
pTymN
pTymN
/NODEFAULTLIB:MSVCRT.lib

add this to your compiler settings. Project/Options or Tools/Settings or something like that. I've had the same problem before and this option should fix it. If it blows up, try the other lib mentioned in the errors.
 
PnP Bios
PnP Bios
Ah, nevermind. I commited the ultimate SDL sin. Forgot to go multithreaded dll under project options.

thanks anyways...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.