Closed pcboy closed 8 years ago
I achieved to compile my code by generating a standalone toolchain first with:
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=/tmp/my-toolchain
And then:
cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/cmake/toolchain.cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_CXX_FLAGS="-std=c++11" -DBUILD_WITH_STANDALONE_TOOLCHAIN=ON -DANDROID_STANDALONE_TOOLCHAIN=/tmp/my-toolchain/
Note: when I generated the standalone toolchain the boost headers were not copied to my toolchain. So I had to do:
cp -rf $NDK/boost/1.61.0/include/boost/ /tmp/my-toolchain/sysroot/usr/include/
Hi,
I'm trying to compile some open source code using CMake. I'm using the toolchain.cmake in
$NDK/cmake/
by simply doing:cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/cmake/toolchain.cmake -DANDROID_ABI=armeabi-v7a
Sadly it doesn't work. During the CMake configure I get this error:I get the same error either on Linux and OSX. To install crystax NDK I simply extracted the
crystax-ndk-10.3.2-b903-darwin-x86_64.tar.xz
archive. I'm using version 10.3.2-b903. I tried to do anexport LDFLAGS="-L$NDK/sources/crystax/libs/armeabi-v7a/"
sadly it didn't work. :(