I tried to build Bullet from SVN revision 1908 but it fails with the following error on Fedora 12 - 64 bits:
Code: Select all
Linking CXX executable AppConvexDecompositionDemo
cd /local/laguerre/Bullet/Demos/ConvexDecompositionDemo && /usr/bin/cmake -E cmake_link_script CMakeFiles/AppConvexDecompositionDemo.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O3 -DNDEBUG -fPIC CMakeFiles/AppConvexDecompositionDemo.dir/main.o CMakeFiles/AppConvexDecompositionDemo.dir/ConvexDecompositionDemo.o -o AppConvexDecompositionDemo -rdynamic ../OpenGL/libOpenGLSupport.a ../../src/BulletDynamics/libBulletDynamics.a ../../src/BulletCollision/libBulletCollision.a ../../src/LinearMath/libLinearMath.a ../../Extras/Serialize/BulletFileLoader/libBulletFileLoader.a ../../Extras/ConvexDecomposition/libConvexDecomposition.a -lglut -lGL -lGLU
../../Extras/Serialize/BulletFileLoader/libBulletFileLoader.a(btBulletFileLoader.o): In function `btBulletFileLoader::createCylinderShapeY(float, float)':
btBulletFileLoader.cpp:(.text+0xda): undefined reference to `btCylinderShape::btCylinderShape(btVector3 const&)'
../../Extras/Serialize/BulletFileLoader/libBulletFileLoader.a(btBulletFileLoader.o): In function `btBulletFileLoader::createCapsuleShape(float, float)':
btBulletFileLoader.cpp:(.text+0x141): undefined reference to `btCapsuleShape::btCapsuleShape(float, float)'
../../Extras/Serialize/BulletFileLoader/libBulletFileLoader.a(btBulletFileLoader.o): In function `btBulletFileLoader::loadFileFromMemory(bParse::btBulletFile*)':
btBulletFileLoader.cpp:(.text+0xd51): undefined reference to `btMultiSphereShape::btMultiSphereShape(btVector3 const*, float const*, int)'
../../Extras/Serialize/BulletFileLoader/libBulletFileLoader.a(btBulletFile.o): In function `bParse::btBulletFile::btBulletFile()':
btBulletFile.cpp:(.text+0xa21): undefined reference to `sBulletDNAlen'
btBulletFile.cpp:(.text+0xa28): undefined reference to `sBulletDNAstr'
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [Demos/ConvexDecompositionDemo/AppConvexDecompositionDemo] Erreur 1
Code: Select all
TARGET_LINK_LIBRARIES(
BulletFileLoader
BulletDynamics
BulletCollision
LinearMath
)
Please note also that the link_libraries macro is deprecated and that target_link_libraries should be used instead. In addition, the target_link_libraries macro is supposed to be added after add_executable. For instance, the CMakeLists.txt file from Demos/ConvexDecompositionDemo/ would contain:
Code: Select all
IF (USE_GLUT)
ADD_EXECUTABLE(AppConvexDecompositionDemo
main.cpp
ConvexDecompositionDemo.cpp
ConvexDecompositionDemo.h
)
TARGET_LINK_LIBRARIES(AppConvexDecompositionDemo
OpenGLSupport BulletDynamics BulletCollision LinearMath BulletFileLoader ConvexDecomposition ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ELSE (USE_GLUT)
ADD_EXECUTABLE(AppConvexDecompositionDemo
WIN32
../OpenGL/Win32AppMain.cpp
ConvexDecompositionDemo.cpp
ConvexDecompositionDemo.h
Win32ConvexDecompositionDemo.cpp
)
TARGET_LINK_LIBRARIES(AppConvexDecompositionDemo
OpenGLSupport BulletDynamics BulletCollision LinearMath BulletFileLoader ConvexDecomposition ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ENDIF (USE_GLUT)
Laurent.