Bullet Physics Test program crashes

Post Reply
BPJ
Posts: 3
Joined: Wed Nov 26, 2014 5:11 am

Bullet Physics Test program crashes

Post by BPJ »

Hi,

I discovered Bullet Physics some days ago, and now I have trouble make it run.
Yesterday, I built the libraries (for 32 bit) by myself (Windows 8.1, 64 bit, CMake 3.0.2, downgraded to MinGW 4.5.2).
Then I made a really basic program just to test out bullet (now, I am using MinGW 4.8.1 again):

Code: Select all

#include <btBulletDynamicsCommon.h>
int main()
{
    btBroadphaseInterface *broadphase = new btDbvtBroadphase();
    delete broadphase;
    return 0;
}
I compiled it with the following command:

Code: Select all

g++ -std=c++11 -O0 -Wall -o bulletTest.exe bulletTest.cpp -lBulletDynamics -lBulletCollision -lLinearMath -static
The compilation is successful, without any warnings or errors, but each time I run "bulletTest.exe" the program just crashes and Windows says "The program is not working anymore".

What do I have to do to let the program run properly?

Thanks in advance,
BPJ
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: Bullet Physics Test program crashes

Post by c6burns »

Isn't mixing binaries from differing mingw versions a nono? I know we've had people run into issues with mingw binary incompatibility in the Ogre forums.
BPJ
Posts: 3
Joined: Wed Nov 26, 2014 5:11 am

Re: Bullet Physics Test program crashes

Post by BPJ »

I already tried to compile the libraries with MinGW 4.8.1, but in this version cc1plus.exe crashes at "btInternalEdgeUtility" and causes a segmentation fault (it's a g++ bug).
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: Bullet Physics Test program crashes

Post by c6burns »

Right I assume there was a reason you downgraded to compile the libs, but if you compile the application with the same gcc version as the libs is the problem still there? Just trying to rule out binary incompatibility as your issue.
BPJ
Posts: 3
Joined: Wed Nov 26, 2014 5:11 am

Re: Bullet Physics Test program crashes

Post by BPJ »

Yesssss, it now works totally fine! I completely reinstalled MinGW (now version 4.7.2) and built the Bullet lib*.a-files. MinGW 4.5.2 had some problems with an undefined reference to some _chk*something*_ms function and couldn't use -std=c++11. So I built the libraries with 4.7.2, copied them and the include-files to 4.8.1 and everything compiles and runs successful now! I also now use "bullet-2.82-r2704" instead of "bullet3-master". So, thank you really much for your assistance!

If somebody wants to know how I did everything in detail, just ask me! :)
Post Reply