Android Cocos2DX using C++ in Eclipse Helios

孤街醉人 提交于 2019-12-01 10:29:59

问题


I have used Eclipse Helios 3.6.1 for Java development. I wanted to start C++ development in the same IDE so I installed Autotools Support For CDT, C/C++ Development Tools, C/C++ Library API Documentation Hover Help plugins.

I have included #include "cocos2d.h" in my HelloWorldScene.h file now when writing the below statement

cocos2d::CCSprite * ccSprite;

I am not getting auto completion bar(template proposals) on writing like coco and pressing Ctrl + Space from my keyboard. What can be the problem?

This might help you solve my problem. Please check here. This is what I got after clicking Right Click Project -> Index -> Search for Unresolved Index. But I have added all includes check here. I think this is causing problem in Content Assist. What should I do in this case? Inclusion seems proper.


回答1:


Can you check if you have included the path to Cocos2d-x headers folder in your project properties? If not right click on your project > Properties > C/C++ General > Paths and Symbols > Includes tab > Add > $PATH_TO_YOUR_COCOS2DX/cocos2dx/include where you must replace $PATH_TO_YOUR_COCOS2DX by the actual absolute path to where you downloaded the cocos2dx framework.

PS: You should upgrade your eclipse to Juno as well, Helios is a bit old now :)




回答2:


Sorry dont download eclipse juno actually. It comes with a new tool for discovery options (huge joke) that results in a lot of "type could not be resolved". Many people have problems with that including myself as you can see there Eclipse Juno's "Preprocessor Include Paths, Macros etc." symbol scanner for CDT It messes all my includes, therefore im going back to indigo.



来源:https://stackoverflow.com/questions/11716052/android-cocos2dx-using-c-in-eclipse-helios

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