Having trouble creating an iphone bullet app

Please don't post Bullet support questions here, use the above forums instead.
O-san
Posts: 19
Joined: Mon May 11, 2009 8:46 am

Having trouble creating an iphone bullet app

Post by O-san »

I've been bending this problem for a while. I can't seem to compile an iphone sdk example which uses bullet in xcode.

If I understood this correctly I should first make a library, this I have managed to do using the iphone sdk library template and just add the bullet/src folder. This project produces a library file called "libbullet.a". My project is named "bullet" hence the name.

Then in a new iPhone app project I include this lib in the "Targets/link binary with libraries" tab. I also set the search path to my bullet-2.75/src folder as well as the search path for the library in the "Edit project settings" window. When I try to compile I get these three link errors:
  • ld warning: in /Users/daniel/Documents/bullet/build/Release-iphoneos/libbullet.a, file is not of required architecture
    Undefined symbols:
    "btAlignedFreeInternal(void*)", referenced from:
    btAxisSweep3Internal<unsigned short>::operator delete(void*)in EAGLView.o
    "btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*, bool)", referenced from:
    -[EAGLView startAnimation] in EAGLView.o
    "btAlignedAllocInternal(unsigned long, int)", referenced from:
    btAxisSweep3Internal<unsigned short>::operator new(unsigned long)in EAGLView.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
Am I supposed to build my own library inside xcode (not using cmake)? I have tried both... I'd be grateful for any help!
O-san
Posts: 19
Joined: Mon May 11, 2009 8:46 am

Re: Having trouble creating an iphone bullet app

Post by O-san »

Seems it was easier to include the /src folder. Now it compiles with just a few warnings... I'll have to test hello world example tomorrow.
ngbinh
Posts: 117
Joined: Fri Aug 12, 2005 3:47 pm
Location: Newyork, USA

Re: Having trouble creating an iphone bullet app

Post by ngbinh »

I really doubt this is the right place to ask such questions. You may try here: http://www.bulletphysics.com/Bullet/php ... um.php?f=9 instead!