Eelmises artiklis saime MS GSL Visual Studioga tööle.
Kui proovida seda g++ 4.9-ga, siis saame veateate. Proovime siis selle asemel GSL Lite-i.
cd ~ git clone https://github.com/martinmoene/gsl-lite.git gsl-lite cd gsl-lite mkdir linux-build cd linux-build cmake .. make ls cd test cd .. test/gsl-lite.t cd ~/git-gsl-lite/gsl-lite/example g++ -std=c++03 -Wall -I../../include/gsl -o 02-span.exe 02-span.cpp ./02-span.exe g++ -std=c++14 -Wall -I../../include/gsl -o 02-span.exe 02-span.cpp ./02-span.exe
Nüüd siis sama asi Androidiga:
cd git clone https://github.com/taka-no-me/android-cmake.git android-cmake cd ~/gsl-lite mkdir android-build cd android-build export PATH=$HOME/my-android-toolchain/bin:$PATH cmake -DCMAKE_TOOLCHAIN_FILE=/home/tiit/android-cmake/android.toolchain.cmake \ -DANDROID_NDK=$NDK \ -DCMAKE_BUILD_TYPE=Release \ -DANDROID_ABI="armeabi-v7a" \ .. cmake --build . cd ~/git-gsl-lite/gsl-lite/example arm-linux-androideabi-g++ -std=c++14 -frtti -fexceptions -fPIE -pie -Wall -I../../include/gsl -o 02-span.exe 02-span.cpp