Forums » C++ Framework » Port iphone cocos2d-x game to android »
| Yang Huang | Port iphone cocos2d-x game to android | ||||
|---|---|---|---|---|---|
|
Added by Yang Huang almost 2 years ago
Hi all, I am trying to port an iphone cocos2d-x game to android. But I got a few issues. 2) When I remove the try...catch... block in the cpp source code and use the APP_STL := stlport_static option. The compiler stops due to "isdigit()" hasn't declared in the scope. I found that the "isdigit()" function is declared in the /usr/include/ in the xcode reference. How can I let the compiler to search the /usr/include/ directory? Thank you! |
||||
| Zhe Wang | RE: Port iphone cocos2d-x game to android | ||||
|
Added by Zhe Wang almost 2 years ago
Sorry for the late reply. "isdigit(int)" is a method in standard C library, you can find it in android-ndk-r5/platforms/android-9/arch-arm/usr/include/ctype.h For example, your path is /android-ndk-r5/ /MyProjects/MyGame/android/ Then you can run the build_native.sh in MyGame/android/ folder (don't forget to modify the XXX_ROOT params in it), or manually run pushd /android-ndk-r5/ ./ndk-build -C /MyProject/MyGame/android/ // run ndk-build at the root of ndk popd Enjoy Coding, Enjoy Life. |
||||
| Yang Huang | RE: Port iphone cocos2d-x game to android | ||||
|
Added by Yang Huang almost 2 years ago
Thank Walzer! |
||||
| Zhe Wang | RE: Port iphone cocos2d-x game to android | ||||
|
Added by Zhe Wang almost 2 years ago
I'm so lazy and using ndk-r5. Enjoy Coding, Enjoy Life. |
||||
| Yang Huang | RE: Port iphone cocos2d-x game to android | ||||
|
Added by Yang Huang almost 2 years ago
Thank you! |
(1-4/4)
