0

I just wrote a tiny program for testing Bullet Physics:

#include <btBulletDynamicsCommon.h>

int main()
{
    btBroadphaseInterface *broadphase = new btDbvtBroadphase();
    delete broadphase;
    return 0;
}

But as soon as I run the program, it just crashes (Windows says that this program is not working anymore).

My compiler is MinGW 4.8.1 and I use Windows 8.1.

This is my build command: g++ -std=c++11 -O0 -o bulletTest.exe bulletTest.cpp -lBulletDynamics -lBulletCollision -lLinearMath -static

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

sigalor
  • 901
  • 11
  • 24

1 Answers1

0

I would suggest that you implement the 'hello world' example for bullet.
http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World

It initializes the same way as you, but more classes, it's a minimum example for initializing bullet properly.

IAmNoone
  • 1,011
  • 1
  • 8
  • 25
  • 1
    Thanks for your answer, but I already found out how to build the libraries properly. I first built the libraries with MinGW 4.7.2, then copied them to MinGW 4.8.1. I also tried out the Hello World example and everything works fine now! – sigalor Nov 27 '14 at 16:47