OSX build woes - just want a framework with double-precision

jrandom
Posts: 5
Joined: Wed Jan 01, 2014 11:22 pm

OSX build woes - just want a framework with double-precision

Post by jrandom »

For the life of me I cannot figure this out. I've used the CMake UI, as well as the command line and can get the framework generated, but no matter what I specify, I cannot get btScalar to be an 8-byte double.

Edit: This is with bullet-2.82-r2704

Command-line-wise, I've tried:

Code: Select all

cmake .. -G "Unix Makefiles" -DINSTALL_LIBS=ON -DBUILD_SHARED_LIBS=ON -DFRAMEWORK=ON -DUSE_DOUBLE_PRECISION=ON \
-DCMAKE_OSX_ARCHITECTURES='i386;x86_64' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/Library/Frameworks \
-DCMAKE_INSTALL_NAME_DIR=/Library/Frameworks -DBUILD_DEMOS:BOOL=OFF
After that, I tried the CMake UI: I've checked "USE_DOUBLE_PRECISION" and added:

Code: Select all

CMAKE_BUILD_TYPE = RelWithDebInfo
CMAKE_INSTALL_NAME_DIR = /Library/Frameworks
CMAKE_INSTALL_PREFIX = /Library/Frameworks
btScalar remains a 4-byte float. What is the correct way to get double precision builds?
jrandom
Posts: 5
Joined: Wed Jan 01, 2014 11:22 pm

Re: OSX build woes - just want a framework with double-preci

Post by jrandom »

Edit: I was able to get a successful build by recreating the project from scratch, but I am still unable to build Bullet with double-precision.

Well drat, now I can't even build a project that uses Bullet -- I get a linker error that says BulletCollision cannot be found. I've got the framework referenced and also set up in a build phase to copy it over:

Image

Image
jrandom
Posts: 5
Joined: Wed Jan 01, 2014 11:22 pm

Re: OSX build woes - just want a framework with double-preci

Post by jrandom »

Figured out the answer: have to define BT_USE_DOUBLE_PRECISION before including the bullet header files so they'll match the compiled library. Don't know why I thought the build process would alter header files (although a build-generated header file with #defined flags used in the build would help to avoid this sort of confusion).