0

I am using Cocos2d for a CoreAudio project. This project previously run well without Cocos2d.

I am getting erros when building that seem to indicate that my build does not tolerate C++files. I have tried to change the C++ file extension from ".cpp" to ".m". I was careful to select the GCC4.2 Compiler. But no luck.

Here is the error codes I get:

error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CAStreamBasicDescription'

error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token

error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token

error: expected '=', ',', ';', 'asm' or '__attribute__' before '!=' token

error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token

error: expected '=', ',', ';', 'asm' or '__attribute__' before '>=' token

error: expected '=', ',', ';', 'asm' or '__attribute__' before '>' token

error: expected ';', ',' or ')' before '&' token

Any idea. I am really stuck here. Thanks.

André
  • 671
  • 1
  • 7
  • 21
  • Your question is a duplicate of http://stackoverflow.com/questions/2739236 . See there. Also, please don't cut the line number before `error:` you post it... that's there to help us. We need as much info as possible to help you! – Yuji Nov 26 '10 at 04:19
  • possible duplicate of [C++ from SpeakHere in iPhone app](http://stackoverflow.com/questions/2739236/c-from-speakhere-in-iphone-app) – Yuji Nov 26 '10 at 04:21

1 Answers1

0

rename the .cpp to .mm (Objective-C++)

then the compiler will know how to handle the CPP file

Farlei Heinen
  • 5,859
  • 1
  • 21
  • 19