[VC7.1] DebugLib error in linking

gandalf51

30-08-2006 14:14:59

Hi,

I'm using the last OgreOde, Ogre1.2 and I can't make the debug Dll

------ Build started: Project: OgreOde_Core, Configuration: Debug Win32 ------

Linking...
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in ode.lib(convex.obj)
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in ode.lib(convex.obj)
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in ode.lib(convex.obj)
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in ode.lib(convex.obj)
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::max_size(void)const " (?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in ode.lib(convex.obj)
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in ode.lib(convex.obj)
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in ode.lib(convex.obj)
msvcprtd.lib(MSVCP71D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in ode.lib(convex.obj); second definition ignored
msvcprtd.lib(MSVCP71D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in ode.lib(convex.obj); second definition ignored
msvcprtd.lib(MSVCP71D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in ode.lib(convex.obj); second definition ignored
msvcprtd.lib(MSVCP71D.dll) : warning LNK4006: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in ode.lib(convex.obj); second definition ignored
msvcprtd.lib(MSVCP71D.dll) : warning LNK4006: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::max_size(void)const " (?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in ode.lib(convex.obj); second definition ignored
msvcprtd.lib(MSVCP71D.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in ode.lib(convex.obj); second definition ignored
msvcprtd.lib(MSVCP71D.dll) : warning LNK4006: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in ode.lib(convex.obj); second definition ignored
Creating library ..\..\lib\Debug/OgreOde_Core_d.lib and object ..\..\lib\Debug/OgreOde_Core_d.exp
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
..\..\lib\Debug/OgreOde_Core_d.dll : fatal error LNK1169: one or more multiply defined symbols found


And what are the differencies between OgreOde and OgreOde_Source ?

tuan kuranes

30-08-2006 14:41:24

Seems to be an incorrect linking here.
Should be oded.lib tinyxmld.lib ogremain_d.lib

only supported build are VS2005, until I finish the premake scripts.

Idea is :
OgeOde.vcproj should be already deprecated.

OgreOde_Core.vcproj or OgreOde_Core_SDK.vcproj is intended for OGRE SDK Binary version, and needs OgreOde to be in the same directory OgreSDK is.

OgreOde_Source.vcproj is intended for OGRE sdk Source version, and needs OgreOde to be in the same directory Ogre source is.

OgreOde_CVS.vcproj is intended for OGRE CVS version, and needs OgreOde to be in its original Ogreaddons directory. (and ogreaddons needs to be in the same directory ogrenew is.)

Anonymous

16-09-2006 20:37:45

Just wondering... did anyone manage to compile the newest OgreODE with vs 7.1? I am quite unfamiliar with vs, and couldn't tweak the project to compile properly (I include the proper .lib, etc, but still get the linking errors Gandalf51 got). Anyone have a pointer to what might be wrong?

tuan kuranes

18-09-2006 13:13:49

Make sure also that you use the ode dll, multithreaded version and not it's static lib.

tone

09-03-2007 18:00:20

OgreOde_Source.vcproj is intended for OGRE sdk Source version, and needs OgreOde to be in the same directory Ogre source is.

What does this mean, precisely?

If I have c:\foo\ogrenew , what should the full path be to my top ogreode directory be?

I already hand-edited the include and library search paths, but my linking error seems to have something in common with the original poster's

I am using ODE in static linking, as this is how Ogre seems to have seen fit to depend on it (actual dependence upon which, I frankly don't see).


Linking...
tnld.lib(tnlLog.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in ogreode_cored.lib(convex.obj)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in ogreode_cored.lib(convex.obj)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in ogreode_cored.lib(convex.obj)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in ogreode_cored.lib(convex.obj)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in ogreode_cored.lib(convex.obj)
msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in ogreode_cored.lib(convex.obj)
Creating library C:\WTF\run\wtfPlayerClient_DEBUG.lib and object C:\WTF\run\wtfPlayerClient_DEBUG.exp
fsCored.lib(fs3D.obj) : warning LNK4217: locally defined symbol ?setAutomatic@StepHandler@OgreOde@@QAEXW4AutoMode@12@PAVRoot@Ogre@@@Z (public: void __thiscall OgreOde::StepHandler::setAutomatic(enum OgreOde::StepHandler::AutoMode,class Ogre::Root *)) imported in function "public: static void __cdecl FS3D::initClass(void)" (?initClass@FS3D@@SAXXZ)
fsCored.lib(fs3D.obj) : warning LNK4217: locally defined symbol ??0StepHandler@OgreOde@@QAE@PAVWorld@1@W4StepModeType@01@MMM@Z (public: __thiscall OgreOde::StepHandler::StepHandler(class OgreOde::World *,enum


etc...


tone