Using release version of Bullet libs when debugging?

Started by
1 comment, last by vinterberg 8 years, 2 months ago

Hey guys and girls,

I've gotten Bullet up and running, but when I'm running my app in debug mode I get errors if I don't link with Bullet debug libraries. Since I only need debug info for my app and not Bullet (the performance is not good enough with Bullet debug libs), is it possible to debug my app with Bullet's release libraries?

The error I get:

Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in errors.obj Bullet Test C:\Users\<removedmyuserid>\Documents\Visual Studio 2015\Projects\Bullet Test\Bullet Test\BulletDynamics_vs2010_x64_release.lib(btDiscreteDynamicsWorld.obj) 1

Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MTd_StaticDebug' in errors.obj Bullet Test C:\Users\<removedmyuserid>\Documents\Visual Studio 2015\Projects\Bullet Test\Bullet Test\BulletDynamics_vs2010_x64_release.lib(btDiscreteDynamicsWorld.obj) 1

I only include "btBulletDynamicsCommon.h" in my project, and link with "BulletDynamics_vs2010_x64_release.lib, BulletCollision_vs2010_x64_release.lib, LinearMath_vs2010_x64_release.lib"..

.:vinterberg:.

Advertisement

You need to compile what would generally be called an "optimised debug" build of bullet, which is compiled with the same debug options (such as iterator debugging) as your app, and linked against the same debug runtime, but has the compiler optimisations enabled (as they would be in a release build).

Alternately, you can compile both bullet and your application for release, and enable debug info for just your application. Keep in mind that this is an actual release build of your application, however, and as such it is significantly harder to debug than a true debug build.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Thank you very much!

This did the trick for me, simply built Bullet again with optimisations enabled :D

.:vinterberg:.

This topic is closed to new replies.

Advertisement