5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Cocos2d-x v3.12のNDK_TOOLCHAIN_VERSIONを変更する

Posted at

環境

Windows 10
cocos2d-x 3.12
NDK r10e

概要

cocos2d-x 3.12ではNDK_TOOLCHAIN_VERSIONがclangで固定されているため、
std::regexを使用しているところで実行時エラーが発生した。
ちなみに3.10の場合は、NDK_TOOLCHAIN_VERSIONが4.9で実行されていた。

原因

  • C:\cocos2d-x-3.12\tools\cocos2d-console\plugins\plugin_compile\build_android.py
200:    def get_toolchain_version(self, ndk_root, compile_obj):
201:        return 'clang'

ここで、clangに固定されているのが原因。

変更方法

直接このファイルを書き換える。

200:    def get_toolchain_version(self, ndk_root, compile_obj):
201:#        return 'clang'
202:        return '4.9'

3.12に対しては上記の変更を行った後、r10e, r11c, r12bのいずれの組み合わせでも正常にビルド&実行できた。

5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?