Problem compiling against OsgBullet 2.81
Opened this issue · 2 comments
GoogleCodeExporter commented
Ran cmake on the check out version of OsgWorks 3.0.0 and when I was compiling
the applications and the examples I got the following error messages:
Linking CXX executable ../../bin/BasicDemo
../../lib/libosgbCollision.so.3.00.00: undefined reference to
`btShapeHull::buildHull(double)'
../../lib/libosgbDynamics.so.3.00.00: undefined reference to
`btAngularLimit::set(double, double, double, double, double)'
../../lib/libosgbDynamics.so.3.00.00: undefined reference to
`btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, double)'
../../lib/libosgbDynamics.so.3.00.00: undefined reference to
`btGeneric6DofSpringConstraint::setStiffness(int, double)'
../../lib/libosgbDynamics.so.3.00.00: undefined reference to
`btGeneric6DofSpringConstraint::setDamping(int, double)'
../../lib/libosgbCollision.so.3.00.00: undefined reference to
`btConvexHullShape::btConvexHullShape(double const*, int, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/BasicDemo] Error 1
make[1]: *** [examples/basicdemo/CMakeFiles/BasicDemo.dir/all] Error 2
make: *** [all] Error 2
And hence the build fails.
Original issue reported on code.google.com by ming...@gmail.com
on 8 Oct 2014 at 3:49
GoogleCodeExporter commented
The release I was compiling on is Ubuntu 14.04.1
Original comment by ming...@gmail.com
on 8 Oct 2014 at 5:06
GoogleCodeExporter commented
This looks like a mismatch between Bullet and osgBullet regarding double
precision. osgBullet's CMake *should* automatically detect whether your Bullet
was built with USE_DOUBLE_PRECISION off or on, but somehow this didn't work for
you.
Check your osgBullet CMakeCache.txt in a text editor. Look for these entries:
OSGBULLET_USE_DOUBLE_PRECISION:BOOL=ON
and
USE_DOUBLE_PRECISION:BOOL=ON
They need to either both be ON as I have shown above, or they need to both be
OFF. It depends on how you built Bullet.
I have seen this problem before, but have never been able to provide a robust
CMake fix for it. CMake compiles a test program that will either compile or
fail depending on how Bullet was built, and then it sets those flags in
CMakeCache.txt accordingly. If you can provide a CMake fix to resolve the
issue, please attach a diff. Thanks.
Original comment by SkewMat...@gmail.com
on 10 Oct 2014 at 1:58
- Changed state: Accepted