I just don't understand, I can build all of the examples just fine. What I want to do is use Bullet's collada conversion code however I get buku linker errors from libbulletcollision.lib saying it redefines certain functions or objects, here are some samples of the linker errors I get.
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: unsigned int __thiscall std::allocator<char>::max_size(void)const " (?max_size@?$allocator@D@std@@QBEIXZ) already defined in libbulletcollision.lib(btTriangleMesh.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: char * __thiscall std::allocator<char>::allocate(unsigned int)" (?allocate@?$allocator@D@std@@QAEPADI@Z) already defined in libbulletcollision.lib(btTriangleMesh.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::allocator<char>::deallocate(char *,unsigned int)" (?deallocate@?$allocator@D@std@@QAEXPADI@Z) already defined in libbulletcollision.lib(btTriangleMesh.obj)
I get about 24 of them, any advice, Note: I am using Visual Studio 8 currently, using a command line arg of /NODEFAULTLIB:LIBCMT.
About the Collada Demo
-
- Posts: 17
- Joined: Thu Nov 09, 2006 8:50 pm
- Location: Middletown, PA
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: About the Collada Demo
The runtime library needs to be the same for all projects. That's one of the reasons I don't ship precompiled libraries. Make sure all projects use the same setting. Are you using projectfiles for all projects, or command line? Just use the same for all. Bullet's projectfiles use Multithreaded by default. You can try to switch the properties:
Project/Properties/Configuration Properties/C++/Runtime library
Hope this helps,
Erwin
Project/Properties/Configuration Properties/C++/Runtime library
Hope this helps,
Erwin
PaloDeQueso wrote:I just don't understand, I can build all of the examples just fine. What I want to do is use Bullet's collada conversion code however I get buku linker errors from libbulletcollision.lib saying it redefines certain functions or objects, here are some samples of the linker errors I get.
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: unsigned int __thiscall std::allocator<char>::max_size(void)const " (?max_size@?$allocator@D@std@@QBEIXZ) already defined in libbulletcollision.lib(btTriangleMesh.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: char * __thiscall std::allocator<char>::allocate(unsigned int)" (?allocate@?$allocator@D@std@@QAEPADI@Z) already defined in libbulletcollision.lib(btTriangleMesh.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall std::allocator<char>::deallocate(char *,unsigned int)" (?deallocate@?$allocator@D@std@@QAEXPADI@Z) already defined in libbulletcollision.lib(btTriangleMesh.obj)
I get about 24 of them, any advice, Note: I am using Visual Studio 8 currently, using a command line arg of /NODEFAULTLIB:LIBCMT.
-
- Posts: 17
- Joined: Thu Nov 09, 2006 8:50 pm
- Location: Middletown, PA
Actually...
Actually the program I'm writing uses the Multi-Threaded-DLL setting, should all of my libs be compiled with that?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Actually...
Yes, always use the same setting for all involved libraries.PaloDeQueso wrote:Actually the program I'm writing uses the Multi-Threaded-DLL setting, should all of my libs be compiled with that?