Code: Select all
g++ -I../src -c -fPIC bullet.cpp -o bullet.o
g++ -shared -Wl,-soname,bullet.so -o bullet.so bullet.o libBulletDynamics.a libLinearMath.a libBulletCollision.a
Code: Select all
#include "btBulletDynamicsCommon.h"
extern "C"{
void* test(){
return new btDefaultCollisionConfiguration();
}
}
Using a different source, for instance the one below, I don't get this error../bullet.so: undefined symbol: _Z21btAlignedFreeInternalPv
Code: Select all
#include "btBulletDynamicsCommon.h"
extern "C"{
void* test(){
return new btVector3(0, 0, 0);
}
}