Problem Compiling under iOS 5

kraythe
Posts: 9
Joined: Mon Aug 06, 2012 8:27 am

Problem Compiling under iOS 5

Post by kraythe »

I pulled the latest version of Bullet from the downloads and I am trying to integrate it into my iOS app and I have some problems compiling. I have copied the compiler settings exactly from the falling cubes demo but it still doest work. However, the falling cubes demo builds and works fine so there must be something I am missing. After hours of working on it, I am out of ideas and would appreciate some help. Thanks in advance.

Here are the compiler errors I am getting (and they dont make ANY sense to me since they compile in falling cubes demo.

Code: Select all

/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:270:8: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:271:5: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:272:8: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:273:5: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:277:8: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:278:5: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:279:8: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:280:5: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:312:21: Expected ')'
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:312:21: Expected ')'
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:312:29: Expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:337:16: Unexpected type name 'btScalar': expected expression
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:340:63: Expected ')'
/Users/kraythe/dev/bullet-2.80-rev2531/src/LinearMath/btScalar.h:340:63: Expected ')'
Too many errors emitted, stopping now
TIA!

P.S. I have the header paths working and they are finding the headers so that isnt the problem. In fact xcode navigates to the offending symbol just fine but it wont compile.
kraythe
Posts: 9
Joined: Mon Aug 06, 2012 8:27 am

Re: Problem Compiling under iOS 5

Post by kraythe »

I have found the problem.

My view controller was a .m file. When it included Bullet, it treated it as C code. Changing it to a .mm solved the problem.

So for all those out there having the same problem, try that.