taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 438 forks source link

A missing sysroot in ANDROID_LINKER_FLAGS #97

Open matszpk opened 7 years ago

matszpk commented 7 years ago

While linking shared library, linkers print error that can't find standard libraries (dl, libc, libm). Reason is a missing sysroot in ANDROID_LINKER_FLAGS. Just I replaced 1326 line in android.toolchain.cmake and all was begins works correctly. I replaced this line by that content:

set( ANDROID_LINKER_FLAGS "--sysroot=${ANDROID_SYSROOT}" )