Same problem for me. Really strange!
My config:
cocos2d-x 2.1.4
XCode 4.6.2
Visibly, it appears when you make a first clean of your project before compiling it.
I managed to solve it
It occurred I was including an Obj-C Class (.h and .m file), which somehow produced that error in Cocos2D. I guess it has to do with the automatic recognition of language by Xcode during compiling. After I renamed the .m file extension to .mm the error went away. So you might want to check if you have such case in your project.
Ok So I am on XCode 5 and I still have this issue for- cocos2d-x-3.0alpha1
Any help ?? … I
to create the project I ran something like this
/create_project.py p gameNAmek com.companname.gameNAme-l cpp
…
But I keep getting this error - CCDatavisitor.h #include string file not found…
I’m using Cocos2dx 2.2, and this issue occurred to me when I add some required framework and admob plugin and helper class written by senior programmer. I can run the build perfectly before
* Update*
I revert my build to last working state before this error occurred. And write the Objective C code by myself. And it’s working
I guess there are some framework or library or includes that cause this error. And as long you did not call them, this error not show up.
I want to share how I solved it.
Recently I writing the code for in app purchase in iOS which is using Objective C. Then I have to set a C*+ static variable to communicate from Objective C to get my C*+ code update the UI. This is where I got this error. Whenever this error occurred, I can’t get it working again by remove the code that cause this error. This is very frustating part. I have to revert my build from backup to get it working again.
Fortunately, I got the answer from someone in stackoverflow. This is caused by the compiler does not recognize the C++ variable, because the compiler is compiling an ObjectiveC code, so you have to change the Identity and Type of your class on the right side panel of your XCode to “Objective-C++ Source”. And, you have to find your cross language code source by yourself, because you will not get an address of the problem from the log.
this error comes specially when your import any .cpp file in your .m file actually difference of compiling unit.this issue occurred in my app and it was very difficult for me to sort out bec it was not pointing at the class where i import .cpp class so what i did i had a backup of my app and i moved my new file bit by bit there checking if that file was creating a prob and finally i figured out in IAP.m file i add the reference of .cpp file class as when as i removed that the error wents
error image
Sorry for asking here, I know I am breaking some forum’s rules but I didn’t find a solution.
I am new to the forum and I did find how to post a new message.