Helloworld on Mac OS X 10.4 with version 2.75-RC5b

sanjuda
Posts: 7
Joined: Tue Jul 14, 2009 10:03 am

Helloworld on Mac OS X 10.4 with version 2.75-RC5b

Post by sanjuda »

trying to install bullet and to use it to run the helloworld application
i used

Code: Select all

 cmake -DBUILD_SHARED_LIBS=ON
make
 


I had the following issues:

Code: Select all

ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
this is solved using

Code: Select all

cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_SHARED_LINKER_FLAGS=-single_module
make
then you get:

Code: Select all

../bullet-2.75-RC5b/src/BulletMultiThreaded/PosixThreadSupport.cpp: In function 'sem_t* createSem(const char*)':
../bullet-2.75-RC5b/src/BulletMultiThreaded/PosixThreadSupport.cpp:61: error: ISO C++ forbids comparison between pointer and integer
this is solved by changing src/BulletMultiThreaded/PosixThreadSupport.cpp line 61 from

Code: Select all

        if (tempSem != SEM_FAILED)
[\code]
to 
[code]
                if (tempSem == reinterpret_cast<sem_t *>(SEM_FAILED))
[\code]
then you get (and there you start at least to grin)
[code]
[ 85%] Building CXX object src/BulletMultiThreaded/CMakeFiles/BulletMultiThreaded.dir/MiniCLTask/MiniCLTask.o
Linking CXX shared library libBulletMultiThreaded.dylib
ld: Undefined symbols:
_btGpu_computeGridSize
/usr/bin/libtool: internal link edit command failed
make[2]: *** [src/BulletMultiThreaded/libBulletMultiThreaded.dylib] Error 1
[\code]
you solve it using the patch at 
[url]http://code.google.com/p/bullet/issues/detail?id=246[/url]
and apply it:
[code]
cd src/BulletMultiThreaded/
patch -p 2 <~/Desktop/missing-_btGpu_computeGridSize-PROPER.diff 
[\code]

now you can install 
everything using
[code]
sudo make install
[\code]

and test everything with the demo called helloworld
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Helloworld on Mac OS X 10.4 with version 2.75-RC5b

Post by Erwin Coumans »

Latest trunk includes both fixes, it didn't make it in RC6 but final version will be fine.

Code: Select all

  if (tempSem != reinterpret_cast<sem_t *>(SEM_FAILED))
(I assume you meant the !=)

Thanks for the feedback.
Erwin