开发者

Cocos2d.h No such file or directory

I'm really struggling with setting up my Cocos2d-x project for android, and I can't figure this next one out.

There's about 45 errors in my program, and I开发者_运维问答 would assume that the code issues are spawned from the fact that it can't find any of the includes, like cocos2d.h.

Any idea why it wouldn't be able to find this?

Thanks

Tom


Your program can't find a particular header file if you write:

#include "cocos2d.h"

The compiler will look in the "Header Search Paths" for that file. By default, if you use a 3rd party library such as cocos2d-x, the compiler won't be looking in that library's folders.

So what you do is to look for a build setting in the IDE/Compiler that you're using that reads something like "Header Search Paths" or "Additional Includes Path" and add the path to the folder that contains the cocos2d.h header file. You may have to add multiple folder paths if the headers of the library are spread across multiple folders, or use a wildcard path (not supported by all compilers/IDEs).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜