LoginSignup
10
7

More than 5 years have passed since last update.

cocos2d-xでコンパイルエラーが出た時の対応

Posted at

バージョン

cocos2d-x 3.2
Xcode 6.1

コンパイルエラー その1

現象

Xcodeをバージョンアップした(勝手にバージョンアップされた)あとに、コンパイルエラーが発生

cocos2d/flappy-bird/cocos2d/cocos/base/CCRef.h:41:1: Unknown type name 'class'; did you mean 'Class'?

対応方法

Apple LLVM 6.0 - LanguageのCompile Sources AsをObjective-C++に設定

コンパイルエラー その2

現象

Reference to “Point” is ambiguous in MacTypes.h
Reference to “Rect” is ambiguous in MacTypes.h

対応方法

cocos2d-xのPointとRectがMacType.hと重複しているので、USING_NS_CC を使わずにcocos2d::Sprite::createに全部変更する

面倒くせぇ…

10
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
7