I'm trying to install bullet 2.76, but failed with the following error messages:
Linking CXX executable makesdna
CMakeFiles/makesdna.dir/makesdna.o: In function `btAlignedObjectArray<int>::~btAlignedObjectArray()':
makesdna.cpp:(.text._ZN20btAlignedObjectArrayIiED1Ev[btAlignedObjectArray<int>::~btAlignedObjectArray()]+0x44): undefined reference to `btAlignedFreeInternal(void*)'
CMakeFiles/makesdna.dir/makesdna.o: In function `btTriangleInfoMap::~btTriangleInfoMap()':
makesdna.cpp:(.text._ZN17btTriangleInfoMapD0Ev[btTriangleInfoMap::~btTriangleInfoMap()]+0xe4): undefined reference to `btAlignedFreeInternal(void*)'
makesdna.cpp:(.text._ZN17btTriangleInfoMapD0Ev[btTriangleInfoMap::~btTriangleInfoMap()]+0xf4): undefined reference to `btAlignedFreeInternal(void*)'
makesdna.cpp:(.text._ZN17btTriangleInfoMapD0Ev[btTriangleInfoMap::~btTriangleInfoMap()]+0x104): undefined reference to `btAlignedFreeInternal(void*)'
makesdna.cpp:(.text._ZN17btTriangleInfoMapD0Ev[btTriangleInfoMap::~btTriangleInfoMap()]+0x114): undefined reference to `btAlignedFreeInternal(void*)'
CMakeFiles/makesdna.dir/makesdna.o:makesdna.cpp:(.text._ZN17btTriangleInfoMapD0Ev[btTriangleInfoMap::~btTriangleInfoMap()]+0x150): more undefined references to `btAlignedFreeInternal(void*)' follow
CMakeFiles/makesdna.dir/makesdna.o:(.rodata._ZTV17btTypedConstraint[vtable for btTypedConstraint]+0x30): undefined reference to `btTypedConstraint::serialize(void*, btSerializer*) const'
collect2: ld returned 1 exit status
make[2]: *** [Extras/Serialize/makesdna/makesdna] Error 1
make[1]: *** [Extras/Serialize/makesdna/CMakeFiles/makesdna.dir/all] Error 2
make: *** [all] Error 2
Can anybody help please?
I ticked "install extra" when configuring by "ccmake" .
Adding custom serialization structures to Bullet is possible, but much more complicated than fixing this link error. You will have to put more effort in this by yourself, if you really want this.
At the moment I have added data structures for all my custom classes and have implemented serialize method similar to btRigidBody's serialize in my classes.
As I understand from instructions next step is generating dna that will have my own data structures in file
I can't build makesdna because of these linker errors, I stopped at this step. I will very appreciate if you will give me some info about these error.
Can you write how complicate will be to do serialization of custom classes that are subclasses of btRigidBody? Do I need to make changes in btBulletWorldImporter?