1. 程式人生 > >【cocos2d-x】cocos2d-x 3.2 在 NDK10下編譯出錯的解決方法

【cocos2d-x】cocos2d-x 3.2 在 NDK10下編譯出錯的解決方法

最近使用cocos2d-x 3.2 在NDK10 版本下打包APK,出現了一個特別奇怪的錯誤。

1. /Users/minggo/SourceCode/cocos2d-x/build/../cocos/./3d/CCBundleReader.cpp:94:23: error: 
      return type of out-of-line definition of 'cocos2d::BundleReader::tell'
      differs from that in the declaration
      ssize_t BundleReader::tell()
   2. /Users/minggo/SourceCode/cocos2d-x/build/../cocos/./3
d/CCBundleReader.h:90:14: note: previous declaration is here long int tell();

這是NDK10自身的BUG導致的。關於以上錯誤,cocos2d-x官方推薦用NDK9來編譯cocos2d-x3.2,並且把錯誤通知給了谷歌。這就應該在下一版本的NDK下可以編譯cocos2d-x3.2了。