Hey,
I have downloaded Cocos2d-x from Github (Both v3 [Latest Commit: d0c3275281d03ae319d076a30972ac5fd7512531] and v3.9 branches [Latest Commit: 7e72a7110c46721115af8b088b082b9ad6f8fd2c]) and I’m having issues compiling it with cmake.
I’m using a MacOSX El Captain 11.10.2.
I think I am doing everything right, I have downloaded dependencies using download-deps.py, instaled Android SDK/NDK, ran setup.py to config my local vars, ran “git submodule update --init” and cmake -G “Unix Makefiles” on the root directory of cocos2d-x.
After setting up cmake and running make, it gets stuck at 42% with this error message:
34 warnings and 4 errors generated.
make[2]: *** [cocos/CMakeFiles/cocos2d.dir/ui/UIEditBox/UIEditBoxImpl-mac.mm.o] Error 1
make[1]: *** [cocos/CMakeFiles/cocos2d.dir/all] Error 2
make: *** [all] Error 2
The errors are:
In file included from /Users/username/cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm:26:
/Users/username/cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h:92:5: error:
unknown type name 'NSFont'
NSFont* constructFont(const char* fontName, int fontSize);
^
In file included from /Users/username/cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm:26:
/Users/username/cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h:90:5: error:
unknown type name 'NSPoint'; did you mean 'Point'?
NSPoint convertDesignCoordToScreenCoord(const Vec2& designCoord, ...
^~~~~~~
Point
In file included from /Users/username/cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm:30:
/Users/username/cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm:568:27: error:
no viable conversion from 'Point' (aka 'cocos2d::Vec2') to 'NSPoint'
(aka 'CGPoint')
...setPosition:convertDesignCoordToScreenCoord(designCoord, _inRetinaMode)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm:530:25: error:
return type of out-of-line definition of
'cocos2d::ui::EditBoxImplMac::convertDesignCoordToScreenCoord' differs
from that in the declaration
NSPoint EditBoxImplMac::convertDesignCoordToScreenCoord(const Vec2& desi...
~~~~~~~
The funny thing is that I can run gen-libs on cocos2d-console and it works without a hitch, but with cmake it just hangs there.
Any tips?
Thanks.