Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slua clang 编译后 crash #322

Open
oathx opened this issue Mar 25, 2022 · 3 comments
Open

slua clang 编译后 crash #322

oathx opened this issue Mar 25, 2022 · 3 comments

Comments

@oathx
Copy link

oathx commented Mar 25, 2022

因为要再SLUA中加入一段C代码, 我使用了最新的NDK版本 android-ndk-r23b 重新编译了SLUA,再android-ndk-r17c之后,已经不再有GCC支持。改用clang. 所以我修改了SLUA的编译脚本make_android.sh 修改如下:
原来的:
cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 -DANDROID_NATIVE_API_LEVEL=android-9 ..
修改后:
cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=$NDKPATH/build/cmake/android.toolchain.cmake -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 -DANDROID_NATIVE_API_LEVEL=android-9 ..
采用cmake 3.23 重新编译SLUA,编译成功了。但是再android真机测试中crash
CLWHP)AMF~O_1}{6O93B1
我不知道如何解决。求帮助

我反复尝试了多种编译方式都会导致crash,最终我单独下载了含有gcc的android-ndk-r17c使用GCC重新编译了SLUA,就正常了,由于gcc在ndk r17之后被移除了,统一采用clang,希望SLUA也能维护一下。我们一直使用SLUA的

@oathx
Copy link
Author

oathx commented Mar 25, 2022

SLUA 我们一直在使用,希望能维护一下

@zhukunqian
Copy link

image
clang中指定c语言的标准即可解决。

这里记录一下解决方案。

@oathx
Copy link
Author

oathx commented Apr 2, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants