Skip to main content
gamedev.net
🔒 Locked

SDL trouble

Started by GenmaC 5 replies 1.7k views
Original Post
GenmaC
GenmaC
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.
Schmacker
Schmacker
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

programering
programering
Maybe use /NODEFAULTLIB in the compiling commands.

Anton Karlsson
Klingis Entertainment
Games with silly humor
GenmaC
GenmaC
Tried that, get a bunch of errors...I don''t know exactly what''s wrong, but its starting to piss me off.
lesmes
lesmes
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.
SimDemon
SimDemon
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
I'll have a link to the TriFaze website as soon as possible. It's still currently being designed, by myself of course! =) I'll update the URL and my signature as soon as possible.Feel free to send me a message on Yahoo! or AOL IM™. =)
GenmaC
GenmaC
Re-compiling Lua as a multi-threaded library did the trick - thanks for the help everybody.

Topic Locked

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

Sign in to reply to this topic.