Caute,
mam problem (resp. neviem ako) s linkovanim. Stiahol som si Bullet physics engine 1.78 (http://bulletphysics.org/wordpress/), skompiloval a vsetko bolo vporiadku, taktiez aj dema fungovali (az na to ze pri soft body demach meshe bolo mozne vidiet len pri wireframe mode). Potom som si chcel vytvorit nejaky maly program ktory by pouzival bullet a ogre (http://ogre3d.org/).
...
#include <BULLET/btBulletDynamicsCommon.h>
...
v dalsom kode som okrem tejto inkludacie s bulletom nic nerobil
pouzivam cmake a CMAKE_CXX_FLAGS som si nastavil na
-I/usr/local/include/BULLET -L/usr/local/lib -lBulletDynamics -lBulletCollision -lLinearMath
kniznice su staticky linkovane (.a). Taktiez som skusal pisat absolutne cesty ku knizniciam, ale ani to nepomohlo.
pri kompilacii mi vypisalo tuto chybu:
CMakeFiles/OgreApp.dir/TutorialApplication.cpp.o||In function `btAlignedAllocator<int, 16u>::deallocate(int*)':|
/usr/local/include/BULLET/LinearMath/btAlignedAllocator.h|90|undefined reference to `btAlignedFreeInternal(void*)'|
CMakeFiles/OgreApp.dir/TutorialApplication.cpp.o||In function `btAlignedAllocator<btTriangleInfo, 16u>::deallocate(btTriangleInfo*)':|
/usr/local/include/BULLET/LinearMath/btAlignedAllocator.h|90|undefined reference to `btAlignedFreeInternal(void*)'|
CMakeFiles/OgreApp.dir/TutorialApplication.cpp.o||In function `btAlignedAllocator<btHashInt, 16u>::deallocate(btHashInt*)':|
/usr/local/include/BULLET/LinearMath/btAlignedAllocator.h|90|undefined reference to `btAlignedFreeInternal(void*)'|
CMakeFiles/OgreApp.dir/TutorialApplication.cpp.o||In function `btAlignedAllocator<int, 16u>::deallocate(int*)':|
/usr/local/include/BULLET/LinearMath/btAlignedAllocator.h|90|undefined reference to `btAlignedFreeInternal(void*)'|
/usr/local/include/BULLET/LinearMath/btAlignedAllocator.h|90|undefined reference to `btAlignedFreeInternal(void*)'|
CMakeFiles/OgreApp.dir/TutorialApplication.cpp.o:/usr/local/include/BULLET/LinearMath/btAlignedAllocator.h|90|more undefined references to `btAlignedFreeInternal(void*)' follow|
CMakeFiles/OgreApp.dir/TutorialApplication.cpp.o:(.rodata._ZTV17btTypedConstraint[vtable for btTypedConstraint]+0x60)||undefined reference to `btTypedConstraint::serialize(void*, btSerializer*) const'|
||=== Build finished: 7 errors, 0 warnings ===|
v subore /usr/local/include/BULLET/LinearMath/btAlignedAllocator.h je samozrejme len prototyp funkcie btAlignedFreeInternal(void *) a pravdepodobne v libLinearMath.a je jej implementacia, ktoru nevie najst lebo ocividne tie kniznice nejako zle linkujem. Podla bulletovskej wiki (
http://bulletphysics.org/mediawiki-1.5.8/index.php/Creating_a_project_from_scratch#Unix.2C_Linux.2C_MinGW_etc
) je poradie linkovanych kniznic spravne.
Predom dakujem za odpovede