Archived

This topic is now archived and is closed to further replies.

SDL trouble

This topic is 5310 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 using SDL and SDL_Net with MSVC++ 6.0. I''ve already set my project to use Multi-threaded DLL, and added SDLmain and SDL (as well as SDL_Net) libraries to my project, but I still get the following errors: IBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCRT.dll) LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCRT.dll) LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj) LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj) LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj) LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj) LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library GlitchServ.exe : fatal error LNK1169: one or more multiply defined symbols found I tried doing nodefaultlib on those two libraries, but that just gives me even more errors (I''m also using Lua and Winsock, and I think that''s about the extent of my external resources). I read the FAQ on SDL and it said that the Multithreaded DLL option would fix this problem, but it doesn''t...any help would be appreciated.

Share this post


Link to post
Share on other sites
I had the same prob.. I went back and made it a single thread, tried to link, then went and changed back to multi threaded DLL... and it worked... dont ask me why, I have no idea.... hope this helps

Share this post


Link to post
Share on other sites
I had this problem when I mixed multithreaded dll libraries with singlethreaded libraries.
Probably your Lua libraries are compiled as singlethreaded.
Try to compile them as multithreaded.

Share this post


Link to post
Share on other sites
I myself have also had this problem. Here is how to fix it:

Got to "Settings" in the "Project" menu. Click the "C/C++" tab, and select "Code Generation" as the category. Change "Use run-time library:" to "Debug Multithreaded DLL".

I think that is what you want. =)

If thispost = 0 Then
GoBack()

Else
Read()
End If

Share this post


Link to post
Share on other sites