Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg.

Post Reply
white_waluigi
Posts: 14
Joined: Sat Nov 09, 2013 3:20 pm

Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg.

Post by white_waluigi »

Everytime I try to build bullet with a load of error messages.
I'm using cmake o build a project for VS 2013 community.
I need a multithreaded debug dll version for a project that wont build without it.
It works fine with just multithreaded debug (normal setting), but if i put the flag on i get this:

Code: Select all

Error	156	error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	157	error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	158	error LNK2005: "public: struct std::_Iterator_base12 * * __thiscall std::_Container_base12::_Getpfirst(void)const " (?_Getpfirst@_Container_base12@std@@QBEPAPAU_Iterator_base12@2@XZ) already defined in gwen_Debug.lib(events.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	159	error LNK2005: "public: void __thiscall std::_Container_base12::_Orphan_all(void)" (?_Orphan_all@_Container_base12@std@@QAEXXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	160	error LNK2005: "public: __thiscall std::locale::id::id(unsigned int)" (??0id@locale@std@@QAE@I@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	161	error LNK2005: "public: __thiscall std::locale::id::operator unsigned int(void)" (??Bid@locale@std@@QAEIXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	162	error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	163	error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	164	error LNK2005: "public: __int64 __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBE_JXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	165	error LNK2005: "public: __int64 __thiscall std::ios_base::width(__int64)" (?width@ios_base@std@@QAE_J_J@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	166	error LNK2005: "protected: __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::basic_streambuf<char,struct std::char_traits<char> >(void)" (??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	167	error LNK2005: "public: virtual __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	168	error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	169	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::eback(void)const " (?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	170	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gptr(void)const " (?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	171	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pptr(void)const " (?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	172	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::egptr(void)const " (?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	173	error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setg(char *,char *,char *)" (?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	174	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::epptr(void)const " (?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	175	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Gninc(void)" (?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	176	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	177	error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Init(void)" (?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	178	error LNK2005: "public: virtual __thiscall std::basic_ios<char,struct std::char_traits<char> >::~basic_ios<char,struct std::char_traits<char> >(void)" (??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	179	error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	180	error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	181	error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	182	error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	183	error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::widen(char)const " (?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	184	error LNK2005: "protected: __thiscall std::basic_ios<char,struct std::char_traits<char> >::basic_ios<char,struct std::char_traits<char> >(void)" (??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	185	error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	186	error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	187	error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	188	error LNK2005: "protected: char * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbase(void)const " (?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	189	error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::gbump(int)" (?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	190	error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::pbump(int)" (?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	191	error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *)" (?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	192	error LNK2005: "protected: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setp(char *,char *,char *)" (?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z) already defined in gwen_Debug.lib(ProgressBar.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	193	error LNK2005: "public: char const * __thiscall std::ctype<wchar_t>::widen(char const *,char const *,wchar_t *)const " (?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z) already defined in gwen_Debug.lib(BaseRender.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	194	error LNK2005: "public: wchar_t const * __thiscall std::ctype<wchar_t>::narrow(wchar_t const *,wchar_t const *,char,char *)const " (?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z) already defined in gwen_Debug.lib(OpenGL_DebugFont.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	195	error LNK2005: "public: static unsigned int __cdecl std::ctype<wchar_t>::_Getcat(class std::locale::facet const * *,class std::locale const *)" (?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z) already defined in gwen_Debug.lib(BaseRender.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\msvcprtd.lib(MSVCP120D.dll)	App_ExampleBrowser
Error	196	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(raisehan.obj)	App_ExampleBrowser
Error	197	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(ios.obj)	App_ExampleBrowser
Error	198	error LNK2005: "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(ios.obj)	App_ExampleBrowser
Error	199	error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(ios.obj)	App_ExampleBrowser
Error	200	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale0.obj)	App_ExampleBrowser
Error	201	error LNK2005: "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z) already defined in msvcprtd.lib(locale0_implib.obj)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale0.obj)	App_ExampleBrowser
Error	202	error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale0.obj)	App_ExampleBrowser
Error	203	error LNK2005: "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(bool)" (?_Init@locale@std@@CAPAV_Locimp@12@_N@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale0.obj)	App_ExampleBrowser
Error	204	error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale0.obj)	App_ExampleBrowser
Error	205	error LNK2005: "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale0.obj)	App_ExampleBrowser
Error	206	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(iosptrs.obj)	App_ExampleBrowser
Error	207	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale.obj)	App_ExampleBrowser
Error	208	error LNK2005: "public: static unsigned int __cdecl std::codecvt<char,char,int>::_Getcat(class std::locale::facet const * *,class std::locale const *)" (?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale.obj)	App_ExampleBrowser
Error	209	error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sbumpc(void)" (?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale.obj)	App_ExampleBrowser
Error	210	error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sgetc(void)" (?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(locale.obj)	App_ExampleBrowser
Error	211	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xlock.obj)	App_ExampleBrowser
Error	212	error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xlock.obj)	App_ExampleBrowser
Error	213	error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xlock.obj)	App_ExampleBrowser
Error	214	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xthrow.obj)	App_ExampleBrowser
Error	215	error LNK2005: "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xthrow.obj)	App_ExampleBrowser
Error	216	error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xthrow.obj)	App_ExampleBrowser
Error	217	error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xthrow.obj)	App_ExampleBrowser
Error	218	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(wlocale.obj)	App_ExampleBrowser
Error	219	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xlocale.obj)	App_ExampleBrowser
Error	220	error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sbumpc(void)" (?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xlocale.obj)	App_ExampleBrowser
Error	221	error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sgetc(void)" (?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ) already defined in msvcprtd.lib(MSVCP120D.dll)	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xlocale.obj)	App_ExampleBrowser
Error	222	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in main.obj	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\libcpmtd.lib(xdateord.obj)	App_ExampleBrowser
Error	223	error LNK1169: one or more multiply defined symbols found	E:\libs\bullet3-master\bullet3-master\build3\examples\ExampleBrowser\Debug\App_ExampleBrowser.exe	App_ExampleBrowser
anthrax11
Posts: 72
Joined: Wed Feb 24, 2010 9:49 pm

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by anthrax11 »

Only the example browser fails since it's an exe and can't be linked to the DLL runtime. The rest of the library should build fine.

Probably the CMake script should be changed to not build the examples if USE_MSVC_RUNTIME_LIBRARY_DLL is set.
white_waluigi
Posts: 14
Joined: Sat Nov 09, 2013 3:20 pm

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by white_waluigi »

You're right it works, thanks, sorry for not noticing.
Just out of curiosity, why is MDd not default for bullet?
anthrax11
Posts: 72
Joined: Wed Feb 24, 2010 9:49 pm

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by anthrax11 »

Well, the example browser wouldn't compile. :)

Which option to choose depends only on whether the bullet library will eventually be located in a .dll or .exe file after linking. Normally a game will be a single .exe file with bullet statically linked into it, which is the case with the bullet examples. Then you would choose MT. This is also how bullet is mostly designed to work.

The only reason to go with MDd is if your game is complex enough that you want to put some component into its own .dll file. For example, you want to put physics code together with bullet into game_physics.dll. Then the main program (linked with MT) calls the DLL (linked with MDd). It looks like this is your case.
white_waluigi
Posts: 14
Joined: Sat Nov 09, 2013 3:20 pm

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by white_waluigi »

well my programm wouldn't compile with md, no idea why.
But thanks for your help
d3x0r
Posts: 51
Joined: Tue Dec 11, 2012 9:59 pm

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by d3x0r »

(VS2015, not 2013)

I also have been having problems getting examples to build....

GWEN CMakeLists.txt has
--- ADD_DEFINITIONS( -DGLEW_STATIC -DGWEN_COMPILE_STATIC -D_HAS_EXCEPTIONS=0 -D_STATIC_CPPLIB)

Remove _STATIC_CPPLIB and app examples build

+++ ADD_DEFINITIONS( -DGLEW_STATIC -DGWEN_COMPILE_STATIC -D_HAS_EXCEPTIONS=0 )
123iamking
Posts: 10
Joined: Wed Oct 11, 2017 4:45 am

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by 123iamking »

anthrax11 wrote:Only the example browser fails since it's an exe and can't be linked to the DLL runtime. The rest of the library should build fine.

Probably the CMake script should be changed to not build the examples if USE_MSVC_RUNTIME_LIBRARY_DLL is set.
I wonder when will this bug is officially fixed. Now the example browser still fails when I set the flag for USE_MSVC_RUNTIME_LIBRARY_DLL. If I don't set this flag, then I can't use Bullet with Ogre project (conflict with SDL2 as I build). If I set this flag, I can't build the example which I really need now :cry:
anthrax11
Posts: 72
Joined: Wed Feb 24, 2010 9:49 pm

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by anthrax11 »

Why not use a second build folder for the examples where you don't set USE_MSVC_RUNTIME_LIBRARY_DLL?
123iamking
Posts: 10
Joined: Wed Oct 11, 2017 4:45 am

Re: Cant build bullet with USE_MSVC_RUNTIME_LIBRARY_DLL falg

Post by 123iamking »

anthrax11 wrote:Why not use a second build folder for the examples where you don't set USE_MSVC_RUNTIME_LIBRARY_DLL?
That could be a solution, thanks :)
Anyway, after I think again, If the only project which builds fail is Example Browser, then it's not so bad, because the important thing is the Examples, I can still browse the Examples manually :D
Post Reply