当前位置: 代码迷 >> 综合 >> (笔记)cocos :llvm toolchain not found!
  详细解决方案

(笔记)cocos :llvm toolchain not found!

热度:91   发布时间:2024-01-14 10:58:01.0

lua binding的时候,执行 genbindings.py:出现以下错误:


llvm toolchain not found!

android-ndk-r10e\toolchains\llvm-3.3\prebuilt\windows-x86_64 are not valid!



进到ndk目录看,真就没这个东西,安装的是NDK10,里面只有3.5,3.6的目录;

于是,将genbindings.py 中的,3.3改成3.5,3.4改成3.6:



    if platform == 'win32':
        x86_llvm_path = os.path.abspath(os.path.join(ndk_root, 'toolchains/llvm-3.6/prebuilt', '%s' % cur_platform))
        if not os.path.exists(x86_llvm_path):
            x86_llvm_path = os.path.abspath(os.path.join(ndk_root, 'toolchains/llvm-3.5/prebuilt', '%s' % cur_platform))
    else:
        x86_llvm_path = os.path.abspath(os.path.join(ndk_root, 'toolchains/llvm-3.6/prebuilt', '%s-%s' % (cur_platform, 'x86')))
        if not os.path.exists(x86_llvm_path):
            x86_llvm_path = os.path.abspath(os.path.join(ndk_root, 'toolchains/llvm-3.5/prebuilt', '%s-%s' % (cur_platform, 'x86')))

    x64_llvm_path = os.path.abspath(os.path.join(ndk_root, 'toolchains/llvm-3.6/prebuilt', '%s-%s' % (cur_platform, 'x86_64')))
    if not os.path.exists(x64_llvm_path):
        x64_llvm_path = os.path.abspath(os.path.join(ndk_root, 'toolchains/llvm-3.5/prebuilt', '%s-%s' % (cur_platform, 'x86_64')))

。。。。。

    if '3.6' in llvm_path:
        config.set('DEFAULT', 'clang_version', '3.6')
    else:
        config.set('DEFAULT', 'clang_version', '3.5')




再执行,就通过了;




Section not found in config file;

Section是ini配置文件的字段名;【】,检查自定义的字段名配置是否正确(。py中的cmd_args和ini文件中的要一致)




lua 绑定自定义类可以参考下这两个文章:

http://blog.csdn.net/rexuefengye/article/details/46553239

http://blog.csdn.net/qiou2719/article/details/50756535


  相关解决方案