-
Hello, i would like to build an application that makes use of the Bullet C API. Here's my minimum (not) working example: CMakeLists.txt:
bullet-connect.cpp:
When I try to build it with
Uncommenting Please, could you guide me in the right direction how to use the C API correctly? Further information:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You need more dependencies, dependent on use of GUI/graphics (GUI) or pure headless (SHARED_MEMORY, DIRECT) For DIRECT, TARGET_LINK_LIBRARIES(App_RobotSimulator_NoGUI BulletRobotics BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath Bullet3Common) https://github.com/bulletphysics/bullet3/blob/master/examples/RobotSimulator/CMakeLists.txt |
Beta Was this translation helpful? Give feedback.
-
Finally, I could solve the linker errors. They were caused by the wrong order of the library entries in The content of the variable looked like this: But the (at least for me) correct order is this: This is the same order as in @erwincoumans' answer, but, unfortunately, his suggestion did not work for me since i could not use the pure library name. Anyway, thanks again for your help @erwincoumans. |
Beta Was this translation helpful? Give feedback.
Finally, I could solve the linker errors.
They were caused by the wrong order of the library entries in
${BULLET_LIBRARIES}
.The content of the variable looked like this:
/usr/local/lib/libBulletDynamics.a;/usr/local/lib/libBulletCollision.a;/usr/local/lib/libLinearMath.a;/usr/local/lib/libBulletSoftBody.a
But the (at least for me) correct order is this:
/usr/local/lib/libBulletDynamics.a;/usr/local/lib/libBulletSoftBody.a;/usr/local/lib/libBulletCollision.a;/usr/local/lib/libLinearMath.a
This is the same order as in @erwincoumans' answer, but, unfortunately, his suggestion did not work for me since i could not use the pure library name.
I really had to use
/usr/local/lib/libSomething.a
, …