Bullet linker problems in XCode

bh0085
Posts: 1
Joined: Thu Jul 02, 2009 4:30 am

Bullet linker problems in XCode

Post by bh0085 »

Hello all -

I am having a problem with my bullet installation and after scouring the forums it seems pretty closely related to one that a lot of other os x users are having...

I download and install bullet 2.74 using cmake -G Xcode. (I have tried installing 2.73 as well). I have no problems getting the Xcode demos working (they look amazing :) but when I try to build Hello World from scratch I get a whole bunch of linker errors.

Because the gcc compiler is complaining about missing symbols and not missing header files, I am sure that the header file search path is good to go. The problem for me is that the static library files are not being created - the bullet/lib directory is empty (except for a readme.txt which explains that at some point in the future, static libraries will be included) and a find . -name "*.a" in bullet's root directory turns up nothing. Searching through my entire system for "*ullet*.a" turns up nothing either.

The only libraries installed live in the folder bullet/msvc/7/ and they have have the file suffix .vcproj.

So where are the ".a" static library files?

I have tried including the src directory and making my own static library as advised by chunky in an old thread but this creates a few thousand xcode errors.

Thanks in advance!
-Ben
User avatar
ejtttje
Posts: 96
Joined: Mon Nov 03, 2008 9:57 pm

Re: Bullet linker problems in XCode

Post by ejtttje »

One suggestion would be to apply this patch:
http://code.google.com/p/bullet/issues/detail?id=247

and then use this:

Code: Select all

cmake -DBUILD_SHARED_LIBS=ON -DFRAMEWORK=ON \
              -DCMAKE_INSTALL_PREFIX=/Library/Frameworks \
              -DCMAKE_INSTALL_NAME_DIR=/Library/Frameworks
you can then do a make && make install to put OS X style framework in /Library/Frameworks, which you can then easily find and link against. I think you could probably do -G Xcode and have it build there, although I haven't really tested that.

Regardless, in Xcode you should be able to expand the "Products" section on the left navigation pane and then right-click -> "get info" on the libraries to see where they are being created...