Jump to content
  • Advertisement
Sign in to follow this  
Nefarious Monkey

[ SDL ] Linker Errors, *Resolved*

This topic is 3460 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

I'm writing a class to handle keyboard input using SDL. I'm writing it in Visual Studio 8. I'm getting tons of Linker errors, and have no clue how to fix them. Here are my linker errors: Linking... 1>msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj) 1>msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj) 1>msvcrt.lib(MSVCR80.dll) : error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj) 1>msvcrt.lib(MSVCR80.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj) 1>msvcrt.lib(MSVCR80.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj) 1>msvcrt.lib(MSVCR80.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj) 1>LIBCMTD.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library 1>SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol _SDL_main referenced in function _main [Edited by - Nefarious Monkey on March 24, 2008 9:34:18 PM]

Share this post


Link to post
Share on other sites
Advertisement
Might be the tiny bit useful if you post the errors you get...

(also, you're not initializing pInstance to 0 to be checking for 0; how are you going to deallocate given its private?)

Share this post


Link to post
Share on other sites
What linker errors are you getting? Are you sure you setup your project correctly? It'll be a lot easier to figure out what the problem is, if we could see the Linker errors ;)
EDIT: Beat me to it :P

Share this post


Link to post
Share on other sites
Quote:
Original post by agi_shi
Might be the tiny bit useful if you post the errors you get...

(also, you're not initializing pInstance to 0 to be checking for 0; how are you going to deallocate given its private?)


The class is a singleton, pInstance is supposed to be private. I have other classes that do that, so that's not the problem.


[Edited by - Nefarious Monkey on March 24, 2008 9:08:15 PM]

Share this post


Link to post
Share on other sites
Was this ever solved?

I'm having the same problem: linking conflicts:

msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)

msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)

msvcrt.lib(MSVCR90.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)

msvcrt.lib(MSVCR90.dll) : error LNK2005: _strrchr already defined in LIBCMTD.lib(strrchr.obj)

msvcrt.lib(MSVCR90.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj)

msvcrt.lib(MSVCR90.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)

msvcrt.lib(MSVCR90.dll) : error LNK2005: __isctype already defined in LIBCMTD.lib(isctype.obj)



LINKER COMMAND LINE:
/VERBOSE:LIB /OUT:"C:\prj\adm_msvc_proj\Debug\game.exe"
/INCREMENTAL
/NOLOGO
/LIBPATH:"\sdk\glew\lib"
/LIBPATH:"\sdk\sdl\SDL-1.2.13\lib"
/LIBPATH:"\sdk\boost\lib"
/LIBPATH:"\sdk\freetype\freetype_2\objs"
/LIBPATH:"\sdk\tinyxml\Debug_STL"
/LIBPATH:"\sdk\freeImage\FreeImage\Dist"
/LIBPATH:"\sdk\portmedia\portmidi\pm_win\Debug"
/LIBPATH:"\sdk\portmedia\portmidi\porttime\Debug"
/LIBPATH:"\sdk\Quicktime\Libraries"
/LIBPATH:"\sdk\FMOD\api\lib"
/MANIFEST /MANIFESTFILE:".\Debug\game.exe.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/NODEFAULTLIB:"LIBC"
/DEBUG
/PDB:".\Debug/guitar_game.pdb"
/SUBSYSTEM:WINDOWS
/DYNAMICBASE:NO
/MACHINE:X86
/ERRORREPORT:PROMPT opengl32.lib glu32.lib glew32.lib tinyxmld_STL.lib SDL.lib SDLmain.lib portmidi.lib porttime.lib libboost_filesystem-vc90-mt-sgd-1_37.lib freetype237MT.lib FreeImage.lib CVClient.lib QTMLClient.lib fmodex_vc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

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!