This is quite a beginner question, but I have been working on cocos2d-iPhone for quite some time on xcode. Now I have switched to cocos2d-x on eclipse, and I am very used to the autocomplete feature. Eclipse does not give autocompletes on pressing ctrl+space for cocos2d-x data types and functions. Is their anyway to get those?
As @user2228947 said, Eclipse can't find the cocos2d-x headers, we need to link the cocos2d-x with our project. I had followed the below steps to enable Auto completion:
- Right click on the project and click on 'Properties'.
- Navigate to C/C++ General -> Paths and Symbols -> Source Location.
- Click 'Link Folder' and then check on 'Link to folder in File system' checkbox.
- Now 'Browse' to the "${COCOS2DX_ROOT}/cocos2dx" folder and click 'ok'
Source: Cocos2d-x Forum