I'm just getting started with bullet and I'm setting up a basic library initialization. I added this line:
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
and when compiling I get tons of errors about `btAlignedAlloc(int, int)' and `btAlignedFree(void*)' being undefined.
I've linked in all three bullet .a libraries. I'm not sure where these two functions are defined or how to find out.
I've included the build output so people can double check and make sure I've linked an included everything properly.
Thanks in advance.
cd '/home/chris/Projects/bullet/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k
gmake all-recursive
Making all in src
/bin/sh ../libtool --tag=CXX --mode=link g++ -O0 -g3 -o bullet Application.o PhysicsWorld.o bullet.o /usr/local/lib/libbulletmath.a /usr/local/lib/libbulletdynamics.a /usr/local/lib/libbulletcollision.a -lGL -lGLU -lSDL
g++ -O0 -g3 -o bullet Application.o PhysicsWorld.o bullet.o /usr/local/lib/libbulletmath.a /usr/local/lib/libbulletdynamics.a /usr/local/lib/libbulletcollision.a -L/usr/lib /usr/lib/libGLU.so /usr/lib/libGL.so /usr/lib/libSM.so /usr/lib/libICE.so /usr/lib/libXmu.so /usr/lib/libXt.so /usr/lib/libXext.so /usr/lib/libXi.so /usr/lib/libX11.so /usr/lib/libSDL.so -lm -ldl -lpthread
/usr/local/lib/libbulletcollision.a(btCompoundCollisionAlgorithm.o): In function `btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm()':
btCompoundCollisionAlgorithm.cpp:(.text+0xbd): undefined reference to `btAlignedFree(void*)'
/usr/local/lib/libbulletcollision.a(btCompoundCollisionAlgorithm.o): In function `btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm()':
btCompoundCollisionAlgorithm.cpp:(.text+0x18d): undefined reference to `btAlignedFree(void*)'
/usr/local/lib/libbulletcollision.a(btCompoundCollisionAlgorithm.o): In function `btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm()':
btCompoundCollisionAlgorithm.cpp:(.text+0x265): undefined reference to `btAlignedFree(void*)'
/usr/local/lib/libbulletcollision.a(btCompoundCollisionAlgorithm.o): In function `btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm(btCollisionAlgorithmConstructionInfo const&, btCollisionObject*, btCollisionObject*, bool)':
btCompoundCollisionAlgorithm.cpp:(.text+0xb54): undefined reference to `btAlignedAlloc(int, int)'
btCompoundCollisionAlgorithm.cpp:(.text+0xb6c): undefined reference to `btAlignedFree(void*)'
/usr/local/lib/libbulletcollision.a(btCompoundCollisionAlgorithm.o): In function `btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm(btCollisionAlgorithmConstructionInfo const&, btCollisionObject*, btCollisionObject*, bool)':
btCompoundCollisionAlgorithm.c
pp:(.text+0x14af): undefined reference to `btAlignedAlloc(int, int)'
btCompoundCollisionAlgorithm.cpp:(.text+0x14c7): undefined reference to `btAlignedFree(void*)'
collect2: ld returned 1 exit status
gmake[2]: *** [bullet] Error 1
gmake[2]: Target `all' not remade because of errors.
gmake[2]: Nothing to be done for `all-am'.
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***
`btAlignedAlloc(int, int)' and `btAlignedFree(void*)' undef
-
- Posts: 2
- Joined: Mon Oct 01, 2007 5:03 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: `btAlignedAlloc(int, int)' and `btAlignedFree(void*)' undef
Which build system are you using exactly?
The btAlignedFree and btAlignedAlloc are defined in src/LinearMath/btAlignedAllocator.cpp, perhaps that is missing.
Thanks for the feedback, and hope this helps,
Erwin
The btAlignedFree and btAlignedAlloc are defined in src/LinearMath/btAlignedAllocator.cpp, perhaps that is missing.
Thanks for the feedback, and hope this helps,
Erwin
-
- Posts: 2
- Joined: Mon Oct 01, 2007 5:03 pm
Re: `btAlignedAlloc(int, int)' and `btAlignedFree(void*)' undef
I'm using kdevelop, so autotools in the backend. You said
"The btAlignedFree and btAlignedAlloc are defined in src/LinearMath/btAlignedAllocator.cpp, perhaps that is missing."
It is missing, I'm using the headers and the .a files I built from the source distro. I ran jam (I think it was) then jam install, so should all the functions defined in the .cpp files now be included in the .a files? Would it be better to copy all the source straight into the project tree and ignore .a's?
thanks again.
"The btAlignedFree and btAlignedAlloc are defined in src/LinearMath/btAlignedAllocator.cpp, perhaps that is missing."
It is missing, I'm using the headers and the .a files I built from the source distro. I ran jam (I think it was) then jam install, so should all the functions defined in the .cpp files now be included in the .a files? Would it be better to copy all the source straight into the project tree and ignore .a's?
thanks again.