Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17085

Unknown type name 'NSPoint' when compiling with CLion on Mac

$
0
0

@flaxe wrote:

I try to build Cocos2d-x "Hello World" application on Mac.
Project normally start from the MyGame.xcodeproj or from command line:

cocos run -p mac

But when I try to build framework:

mkdir macbuild && cd macbuild
cmake -G "Unix Makefiles" -DBUILD_CPP_TESTS=OFF -DBUILD_LUA_LIBS=OFF ..
make

Or launch MyGame from CLion I have some errors with Apple classes:

In file included from cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm:26:
cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h:90:5: error: 
    unknown type name 'NSPoint'; did you mean 'Point'?
    NSPoint    convertDesignCoordToScreenCoord(const Vec2& designCoord, ...
    ^~~~~~~

In file included from cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm:26:
cocos2d-x/cocos/ui/UIEditBox/UIEditBoxImpl-mac.h:92:5: error: 
    unknown type name 'NSFont'
    NSFont*    constructFont(const char* fontName, int fontSize);
    ^

How I can fix it?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17085

Trending Articles