DirectX9 and Bullet
Posted: Thu Sep 09, 2010 3:01 am
After I got Bullet to compile I was keen to link it to DirectX9 so I could figure out how scaling was going to work and see how I was going to debug the collisions.
Unfortunately when I use both libraries together I get a new linker problem.
Heres are my includes.
#include <windows.h> //Ruled out by adding to hello world bullet program
#include <mmsystem.h> //Ruled out by adding to hello world bullet program
#include <d3d9.h>
#include <d3dx9.h>
#include <btBulletDynamicsCommon.h>
Here is the error that my application gets, all the Bullet programs complete their compilation fine.
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __wassert already defined in LIBCMTD.lib(wassert.obj)
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)
4>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
4>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
4>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
4>Debug\HLSLDiffusePointLight.exe : fatal error LNK1169: one or more multiply defined symbols found
It appear DX does not want to share. Has anyone met and overcome this issue or got a suggestion as to how to proceed? I tried many combinations of /NODEFAULTLIB but when I switch that on anywhere no one wants to compile.
When I get rid of these annoying Linker teething problems I promise not to be a pain
Unfortunately when I use both libraries together I get a new linker problem.
Heres are my includes.
#include <windows.h> //Ruled out by adding to hello world bullet program
#include <mmsystem.h> //Ruled out by adding to hello world bullet program
#include <d3d9.h>
#include <d3dx9.h>
#include <btBulletDynamicsCommon.h>
Here is the error that my application gets, all the Bullet programs complete their compilation fine.
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgmalloc.obj)
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgfree.obj)
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: __wassert already defined in LIBCMTD.lib(wassert.obj)
4>MSVCRTD.lib(MSVCR100D.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)
4>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
4>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
4>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
4>Debug\HLSLDiffusePointLight.exe : fatal error LNK1169: one or more multiply defined symbols found
It appear DX does not want to share. Has anyone met and overcome this issue or got a suggestion as to how to proceed? I tried many combinations of /NODEFAULTLIB but when I switch that on anywhere no one wants to compile.
When I get rid of these annoying Linker teething problems I promise not to be a pain