build_native.sh

Hi.

Everytime I run ‘build_native.sh’ script. I got this error.

Compile++ thumb : cocos2d <= cocos2d.cpp
In file included from jni/…/…/…/cocos2dx/include/CCLabelBMFont.h:36:0,
from jni/…/…/…/cocos2dx/include/cocos2d.h:72,
from jni/…/…/…/cocos2dx/cocos2d.cpp:27:
jni/…/…/…/cocos2dx/include/OgreUTFString.h:198:48: error: expected class-name before ‘{’ token
jni/…/…/…/cocos2dx/include/OgreUTFString.h: In constructor ‘Ogre::UTFString::invalid_data::invalid_data(const string&)’:
jni/…/…/…/cocos2dx/include/OgreUTFString.h:201:76: error: expected class-name before ‘(’ token
jni/…/…/…/cocos2dx/include/OgreUTFString.h:201:76: error: expected ‘{’ before ‘(’ token
make: * Error 1
Do you have any idea what’s the cause of this?
ill upload the OgreUTFString class.
btw the v. of cocos2d that this projects is using.
cocos2d-1.0.1-x-0.9.2 @ Oct.20,2011 D:
Error occurs on this part of OgreUTFString.h
class invalid_data: public std::runtime_error { /
i don’t know why the beautifier is freaking out on this line
/
public:

//! constructor takes a string message that can be later retrieved by the what() function
explicit invalid_data( const std::string& _Message ): std::runtime_error( _Message ) // <———— Occurs here.
{
/* The thing is, Bob, it’s not that I’m lazy, it’s that I just don’t care. */
}

};

Thanks!


OgreUTFString.h.zip (16.2 KB)


OgreUTFString.h.zip (16.2 KB)

Are you using std library and using includes???

using namespace std;