Hello! I´m new in this topic, I hope you can help me.
I'm using Bullet Physics, on Windows 8.1 and Visual Studio 2012. I have compiled the libraries without problems but when try to link Bullet with Simox to build this software I have the next errors:
15>BulletDynamics_Debug.lib(btDiscreteDynamicsWorld.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in DynamicsWorld.obj
15>BulletDynamics_Debug.lib(btRigidBody.obj) : error LNK2038: error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in DynamicsWorld.obj
15>BulletDynamics_Debug.lib(btHingeConstraint.obj) : error LNK2038: error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in DynamicsWorld.obj
...
43>BulletDynamics_Debug.lib(btRigidBody.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in BulletDebugViewerWin32.obj
43>BulletDynamics_Debug.lib(btPoint2PointConstraint.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in BulletDebugViewerWin32.obj
...
What should I do?
error LNK2038: mismatch detected for 'RuntimeLibrary'
-
- Posts: 2
- Joined: Thu Jan 29, 2015 3:49 pm
-
- Posts: 72
- Joined: Wed Feb 24, 2010 9:49 pm
Re: error LNK2038: mismatch detected for 'RuntimeLibrary'
Since you seem to be building a DLL, then Bullet also needs to be compiled with the Multi-threaded DLL runtime library. So if you use CMake to build Bullet, set the USE_MSVC_RUNTIME_LIBRARY_DLL flag. I don't know if there is any such option for Premake.
More info here: https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
More info here: https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
-
- Posts: 2
- Joined: Thu Jan 29, 2015 3:49 pm
Re: error LNK2038: mismatch detected for 'RuntimeLibrary'
Thank you so much! That works perfectly!