[ FIXED ] Problem building my project on Xcode

Hi all,

I’m using Cocos2d-x on Windows 7 with Visual C++ 2010 Express. I can successfully compile and run my project.

In order to test the project on iOS devices I do the following:

  • Create empty cocos2dx_box2d project on my MacMini with Xcode 4.3.3
  • Delete ( Move to trash ) the default AppDelegate.h, AppDelegate.cpp, HelloWorldScene.h, and HelloWorldScene.cpp files created by the project template.
  • Copy my .h and .cpp files ( created on Windows pc ) inside the Xcode Classes folder.
  • Copy my resources files ( created on Windows pc ) inside the Xcode Resources folder.
  • Add the copied files to my Xcode project with “Right Click”, “Add Files to…”.
  • Click RUN and I can successfully run and test the app on my iOS devices.

If I then try to Archive my project or “clean” and “build” my project again I get a lot of errors with the result that I’m not able to run my project anymore.
I get a lot of Parse Issue and Semantic Issue errors like the followings:

@
CCCommon.h
Parse Issue
Unknown type name ‘namespace’

CCGeometry.h
Parse Issue
Unknown type name ‘namespace’

gl.h
Semantic Issue
Unknown type name ‘GLenum’
@

followed by

Apple LLVM compiler 3.1 Error
Too many errors emitted, stopping now…

Do you have any ideas how to solve that and compile my project? Am I doing any error when importing my files to the Xcode project? Any help is highly appreciated.

Thanks!

Fixed.

It was all fault of two files of my project called “Block.h” and “Block.cpp”. Just renamed and everything compiles.

Thanks.