Trouble with Xcode & Bullet-2.76 ... :-(

Atch
Posts: 2
Joined: Fri May 28, 2010 11:29 am

Trouble with Xcode & Bullet-2.76 ... :-(

Post by Atch »

Hi everybody I'm a newbie! And, knowing that I tried a long time various things before posting here (3 days with this problem without any solution... ).
Let's go...
I use:
Mac os 10.6.3
Xcode 3.2.2
bullet-2.76.tgz from here: http://code.google.com/p/bullet/downloads/list
cmake 2.8-1 (useless if I follow the "Creating a project from scratch using XCode")

I read this: http://bulletphysics.org/mediawiki-1.5. ... om_scratch ("Creating a project from scratch using XCode")
and do exactly what they said...
Xcode 3.2 is a bit different from the one in the "Creating a project from scratch using XCode"
So, In Xcode 3.2 I choose "command line tool" in type I choose "C++ stdc++"
I add the #include "btBulletDynamicsCommon.h" line
I edit and modify "project settings" as they say
And when I try to I build :

Code: Select all

Ld build/essai2.build/Release/essai2.build/Objects-normal/x86_64/essai2 normal x86_64
cd /Users/name/Documents/Bullet/essai2
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/name/Documents/Bullet/essai2/build/Release -F/Users/name/Documents/Bullet/essai2/build/Release -filelist /Users/name/Documents/Bullet/essai2/build/essai2.build/Release/essai2.build/Objects-normal/x86_64/essai2.LinkFileList -mmacosx-version-min=10.6 -o /Users/name/Documents/Bullet/essai2/build/essai2.build/Release/essai2.build/Objects-normal/x86_64/essai2

ld: warning: directory '/Users/name/Documents/Bullet/essai2/build/Release' following -L not found
ld: warning: directory '/Users/name/Documents/Bullet/essai2/build/Release' following -F not found
Undefined symbols:
  "btTypedConstraint::serialize(void*, btSerializer*) const", referenced from:
      vtable for btTypedConstraintin main.o
  "btAlignedFreeInternal(void*)", referenced from:
      btAlignedObjectArray<btTriangleInfo>::clear()        in main.o
      btAlignedObjectArray<int>::clear()    in main.o
      btHashMap<btHashInt, btTriangleInfo>::~btHashMap()in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
This Warning and error repeat 3 times, One time for each architecture...
I can't find the solution :-(
vicapow
Posts: 2
Joined: Tue Jun 01, 2010 7:46 pm

Re: Trouble with Xcode & Bullet-2.76 ... :-(

Post by vicapow »

I seem to be having a similar issue:

bullet version: bullet-2.76
cmake version: version 2.6-patch 2
os: Mac OS X 10.5.8

This is what i used for cmake:

Code: Select all

cmake -DBUILD_SHARED_LIBS=ON -DFRAMEWORK=ON -DCMAKE_INSTALL_PREFIX=/Library/Frameworks -DCMAKE_INSTALL_NAME_DIR=/Library/Frameworks
but i get these errors as the last few lines after executing 'make'

Code: Select all

  "_sBulletDNAlen", referenced from:
      _sBulletDNAlen$non_lazy_ptr in btBulletFile.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [Extras/Serialize/BulletFileLoader/libBulletFileLoader.dylib] Error 1
make[1]: *** [Extras/Serialize/BulletFileLoader/CMakeFiles/BulletFileLoader.dir/all] Error 2
make: *** [all] Error 2
any ideas why?
Atch
Posts: 2
Joined: Fri May 28, 2010 11:29 am

Re: Trouble with Xcode & Bullet-2.76 ... :-(

Post by Atch »

now it's ok for me.
here is my procedure:
cmake . -G "Xcode" (in the bullet 2.76 directory)
it will generate an Xcode project (BULLET_PHYSICS.xcodeproj)
Open it with Xcode
Build it ( ⌘B )
now library are built but not installed: "libBulletCollision.a", "libBulletDynamics.a", and "libLinearMath.a" file are in "...../src/BulletCollision/Debug", "...../src/BulletDynamics/Debug", and "..../src/LinearMath/Debug" folders. Final folder will be Debug or Release depending of your buid option.

now Creating a project from scratch using XCode:
Follow what it is said here: http://www.bulletphysics.org/mediawiki- ... om_scratch for the OS X part off course...
As the library is not installed, add library file ( libBulletDynamics.a etc..) manualy to your project (drag&drop should work)
And after that "hello world" compile properly.

Hope this can help... & sorry for my bad english
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Trouble with Xcode & Bullet-2.76 ... :-(

Post by Erwin Coumans »

We don't support 'installation' or usage of shared libraries (some people contributed some code for this, but it is not supported)

Static libraries should work just fine, and if there is any issue with linking against static Bullet libraries we'll try to fix them.
Thanks,
Erwin
vicapow
Posts: 2
Joined: Tue Jun 01, 2010 7:46 pm

Re: Trouble with Xcode & Bullet-2.76 ... :-(

Post by vicapow »

i see. o well.

i would suggest udating the INSTALL file to reflect that
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Trouble with Xcode & Bullet-2.76 ... :-(

Post by Erwin Coumans »

vicapow wrote:i see. o well.

i would suggest udating the INSTALL file to reflect that
Good point, will do that.
Thanks for the feedback,
Erwin