Unresolved inclusion: “cocos2d.h” - Cocos2dx

匿名 (未验证) 提交于 2019-12-03 00:56:02

问题:

when I import the cocos2dx android project in my eclipse I get this warning on my header files

    Unresolved inclusion: "cocos2d.h" 

Why is this? Its actually bugging me. The project compiles and runs correctly but I want that to go away. Can someone tell me how to remove that warning and also I want the intellisense feature for my c++ projects in eclipse. I have that feature for my android stuff but not for c++.

Please guide me. Thanks in advance :)

回答1:

Add cocos2d-x resource to your Eclipse

  • Right click your project and choose Properties
  • Find Java Build Path
  • Find Link Source Browse under Source Tab
  • Add $COCOS2DX-HOME/cocos2dx/platform/android/java/src/ and fill cocos2dx src in Folder name

Reference: http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started



回答2:

If it's Cocos2dx v3.0, the answer above is not correct. Please check my answer at this: Many Errors with cocos2d-x-3.0 project creation



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!