xLua icon indicating copy to clipboard operation
xLua copied to clipboard

WSL下使用make_android_lua54.sh编译失败,NDK=r23b

Open Run0812 opened this issue 1 year ago • 2 comments

lmathlib.c中使用了log2函数,需要在Android API >= 18的情况下 libm.so中才存在此符号 但是make_android_lua54.sh中是指定了API等级 android-18

也许是我使用的NDK版本的cmake参数不支持ANDROID_NATIVE_API_LEVEL了? 个人的解决方法是多传一个 -DANDROID_PLATFORM=${API} 来指定API等级

[ 2%] Linking C shared library libxlua.so ld: error: undefined symbol: log2

referenced by lmathlib.c CMakeFiles/xlua.dir/lua-5.4.1/src/lmathlib.c.o:(math_log) did you mean: logb defined in: /home/myname/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/16/libm.so clang: error: linker command failed with exit code 1 (use -v to see invocation)

Run0812 avatar Nov 09 '24 02:11 Run0812

我用r21b

chexiongsheng avatar Nov 13 '24 01:11 chexiongsheng

我用r21b

因为unity 2022.3 tls的 ndk版本是r23b (23.1.7779620),所以我用了r23b。

Run0812 avatar Nov 26 '24 06:11 Run0812