I'm trying to use bullet C api (I want to try and integrate it into existing game engine written in C). I am compiling my bullet test apps with MinGW compilers on Windows 7.
But, even the BulletDino.c from BulletDinoDemo won't compile with gcc, failing with hundreds of "undefined reference" errors, even though I specify all needed libraries (I presume so). Compiling same source file with g++ using same parameters works perfectly and I get a working application. Mine own short test application behaves just the same.
I've compiled Bullet libraries using MinGW as well, but, since Bullet itself is written in C++, it seems to me that those just don't fit when compiling a C code. I'm confused here a bit. How can one get libraries usable for compiling C code with Bullet C Api?
My gcc/g++ command line goes as follows. Source files are in the same directory.
Code: Select all
compile.sh
g++ -I C:/glut-3.7.6-bin-32and64 -I N:/C++/bullet-2.79/src -L C:/glut-3.7.6-bin-32and64 BulletDino.c -L N:/C++/bullet-2.79/lib/mingw32 -lBulletDynamics -lBulletCollision -lLinearMath -lopengl32 -lglu32 -lglut32 -o bd