Jump to content
  • Advertisement
Sign in to follow this  
PnP Bios

Doh! Linking errors... from my library

This topic is 5051 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

--------------------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?

Share this post


Link to post
Share on other sites
Advertisement
/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.

Share this post


Link to post
Share on other sites
Ah, nevermind. I commited the ultimate SDL sin. Forgot to go multithreaded dll under project options.

thanks anyways...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!