SDL Linking error
Well I can't seem to get any programs to compile successfully in SDL at the moment (Using visual C++ 6)
I always receive the following error - I'm not sure what it means but my best guess is functions in 2 different libraries with the same name are getting in the way of each other?
anyway hopefully someone here has dealt with this before/knows what it means, here's the output when I go to compile...
*edit* If you're wondering what the code was in this instance, it was the example from part 1 of the cornerstone SDL tutorials (Which I assume ought to work!)
--------------------Configuration: TutorialIntroduction - Win32 Debug--------------------
Compiling...
main.cpp
Linking...
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in LIBCD.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in LIBCD.lib(isctype.obj)
LIBCD.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/TutorialIntroduction.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
TutorialIntroduction.exe - 5 error(s), 1 warning(s)
Make sure that you're linking against the debug libraries for a debug build, and release libraries for release builds. Also your project needs to be set up under "Code Generation" for "Multithreaded DLL". I think the code-generation settings can be accessed under Project->Options. There's a drop down that enables you to display the code generation settings.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement