Sincerely need your help

Hey there, I’m really new to Cocos2d-x, but after many attempts I come here for guidance.

I wrote a demo and wannna build it to the Android platform as this topic taught [[http://www.cocos2d-x.org/forums/6/topics/37122]]
Every things come okay except that some macros like UINT and GL_LINE_SMOOTH error Undefined. and once I add includes in c++ .Cygwin error can not find the header files.

So what should I do ? Or are there any solutions?

Sincerely need you help indeed ! Pretty Thanks !

:slight_smile:

:slight_smile:

You’ better create project with tool/project_creator.py rather than manual.but if you want to learn how to config project you should copy the all the configuration of TestCpp.
Hope this can help you

lu bai wrote:

You’ better create project with tool/project_creator.py rather than manual.but if you want to learn how to config project you should copy the all the configuration of TestCpp.
Hope this can help you

Yeah,thanks for your help!
Actually my project was created through Python.But the question is how to build it to Android platform since it work well at PC. Unnecessary need header files to be included.
I guess if I should modify the Android.mk file. But I don’t know what to do. Or if there are any tools to configure this?
Thanks for your help!:slight_smile:

Can you show me the error log which is printed by eclipse console.
I think you should try to compile the projects of samples at first to check your android dev environment.

lu bai wrote:

Can you show me the error log which is printed by eclipse console.
I think you should try to compile the projects of samples at first to check your android dev environment.

Thank you!
The samples work well.
And now I wanna add something of my own. I build it through Cygwin as this topic taught http://www.cocos2d-x.org/forums/6/topics/37122

The Errors just show some macros are not defined somewhere in my code.
In vs2012 , it works well. (don’t need to include header files)
So I guess I should manual add some settings to the MK file.
And I don’t know how to figure it out!
Thank you!:slight_smile:

:frowning:

Basing on the fact that one of your errors was about GL_LINE_SMOOTH :
GL_LINE_SMOOTH is an OpenGL macro, but it is used in the PC version of OpenGL (which explains why it worked on Windows). Unfortunatelly, after checking if it isthe same in OpenGL E.S. 2.0 (the version used by cocos for mobile devices, ES = Embedded Systems), the macro looks different there - it is just LINE_SMOOTH.
Here are the docs : http://www.khronos.org/registry/gles/specs/2.0/es_cm_spec_2.0.24.pdf
The same thing goes for UINT I think, as this is also from OpenGL, but in ES version there is UNSIGNED_INT.

Hope this helps!

Pawel Lopusinski wrote:

Basing on the fact that one of your errors was about GL_LINE_SMOOTH :
GL_LINE_SMOOTH is an OpenGL macro, but it is used in the PC version of OpenGL (which explains why it worked on Windows). Unfortunatelly, after checking if it isthe same in OpenGL E.S. 2.0 (the version used by cocos for mobile devices, ES = Embedded Systems), the macro looks different there - it is just LINE_SMOOTH.
Here are the docs : http://www.khronos.org/registry/gles/specs/2.0/es_cm_spec_2.0.24.pdf
The same thing goes for UINT I think, as this is also from OpenGL, but in ES version there is UNSIGNED_INT.
>
Hope this helps!

:slight_smile: :wink:
Yeah Thank you very much!
I got it!
Cheer!