Skip to main content
gamedev.net
🔒 Locked

link error =(

Started by Lazy Oct 17, 2005 at 3:26 PM 1 replies 450+ views
Original Post
Lazy
Lazy
Hi I've made a solution (mvs7.1) with four projects. Three of the projects create static libraries that the last project uses. ( one of them is Misc.lib ) For some reason I get this link error libcpmtd.lib(xlock.obj) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in Misc.lib(String_Misc.obj) I've done the same in another solution, and it works there. But in this new one I've made, the main project uses MFC. In the lib projects I've set Ignore All Defaul Libraries, but that didn't help.=( And I have set Ignore LIBCD in the main project. ( 'couse I got a warning : LINK : warning LNK4098: defaultlib 'LIBCD' conflicts with use of other libs; use /NODEFAULTLIB:library ) Anyone got a clue?
ZZzz..
JohnBolton
JohnBolton
One or more of your projects link with the multi-threaded version of the C library (CRT) and one or more link with the single-threaded version. All projects must link with the same version.

You will also get similar errors/warnings if you mix release and debug, and static and DLL.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
iMalc
iMalc
Wow, you wouldn't believe it, this was almost the exact same error I had just yesterday, doing some embedded development. Exept in my case, Lockit was the only thing not defined. I simply included some lib with a name that was similiar or perhaps equal to what is mentioned below.
It linked after that, but I've got other problems with it now. I'll check what threading version of the CRT I'm using in both projects - Thanks!

Topic Locked

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

Sign in to reply to this topic.