Building Native Examples

Discussion of compiling the SDK and applications.
Post Reply
RobX
Posts: 1
Joined: Wed Feb 21, 2018 8:34 am

Building Native Examples

Post by RobX » Wed Feb 21, 2018 8:39 am

Hope someone cam help.

I'm having trouble building the native examples from artoolkitx repo.
Looks like glStateCache.h header is not being included or it can't find and implementation for the interface?

Here is the output from my console.

Building on Linux (x86_64)
from /home/robert/dev/artoolkit5: going to AndroidStudioProjects/ARSimpleNativeCarsProj/aRSimpleNativeCars
Android NDK: WARNING: APP_PLATFORM android-15 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be comptible with devices older than android-15. See https://android.googlesource.com/platfo ... roblems.md for more information.
rm -f ./libs/arm64-v8a/* ./libs/armeabi/* ./libs/armeabi-v7a/* ./libs/mips/* ./libs/mips64/* ./libs/x86/* ./libs/x86_64/*
rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/mips/gdbserver ./libs/mips64/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver
rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/mips/gdb.setup ./libs/mips64/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup
[armeabi-v7a] Gdbserver : [arm-linux-androideabi] libs/armeabi-v7a/gdbserver
install -p /home/robert/Android/Sdk/ndk-bundle/prebuilt/android-arm/gdbserver/gdbserver ./libs/armeabi-v7a/gdbserver
[armeabi-v7a] Gdbsetup : libs/armeabi-v7a/gdb.setup
echo "set solib-search-path ./obj/local/armeabi-v7a" > ./libs/armeabi-v7a/gdb.setup
echo "directory /home/robert/Android/Sdk/ndk-bundle/sysroot jni/../../../../../../android/libs/armeabi-v7a jni/../../../../../../android/../include/android /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/../llvm-libc++abi/include /home/robert/Android/Sdk/ndk-bundle/sources/android/support/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi jni/../../../../../../android/jni/curl/libs/armeabi-v7a jni/../../../../../../android/obj/local/armeabi-v7a" >> ./libs/armeabi-v7a/gdb.setup
[x86] Gdbserver : [i686-linux-android] libs/x86/gdbserver
install -p /home/robert/Android/Sdk/ndk-bundle/prebuilt/android-x86/gdbserver/gdbserver ./libs/x86/gdbserver
[x86] Gdbsetup : libs/x86/gdb.setup
echo "set solib-search-path ./obj/local/x86" > ./libs/x86/gdb.setup
echo "directory /home/robert/Android/Sdk/ndk-bundle/sysroot jni/../../../../../../android/libs/x86 jni/../../../../../../android/../include/android /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/../llvm-libc++abi/include /home/robert/Android/Sdk/ndk-bundle/sources/android/support/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi jni/../../../../../../android/jni/curl/libs/x86 jni/../../../../../../android/obj/local/x86" >> ./libs/x86/gdb.setup
[armeabi-v7a] Install : libARWrapper.so => libs/armeabi-v7a/libARWrapper.so
install -p ./obj/local/armeabi-v7a/libARWrapper.so ./libs/armeabi-v7a/libARWrapper.so
/home/robert/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libARWrapper.so
[armeabi-v7a] SharedLibrary : libARWrapperNativeCarsExample.so
/home/robert/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -Wl,-soname,libARWrapperNativeCarsExample.so -shared --sysroot=/home/robert/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm ./obj/local/armeabi-v7a/objs/ARWrapperNativeCarsExample/ARWrapperNativeCarsExample.o jni/../../../../../../android/obj/local/armeabi-v7a/libeden.a /home/robert/Android/Sdk/ndk-bundle/sources/android/support/../../cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a -latomic -Wl,--exclude-libs,libatomic.a ./obj/local/armeabi-v7a/libARWrapper.so ./obj/local/armeabi-v7a/libc++_shared.so -gcc-toolchain /home/robert/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -no-canonical-prefixes -target armv7-none-linux-androideabi15 -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/home/robert/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm/usr/lib -llog -lGLESv1_CM -lc -lm -o ./obj/local/armeabi-v7a/libARWrapperNativeCarsExample.so
jni/ARWrapperNativeCarsExample.cpp:119: error: undefined reference to 'glStateCacheFlush'
jni/ARWrapperNativeCarsExample.cpp:144: error: undefined reference to 'glStateCacheEnableDepthTest'
jni/ARWrapperNativeCarsExample.cpp:145: error: undefined reference to 'glStateCacheEnableLighting'
jni/../../lib/SRC/Eden/glm.c:2579: error: undefined reference to 'glStateCacheBlendFunc'
jni/../../lib/SRC/Eden/glm.c:2580: error: undefined reference to 'glStateCacheEnableBlend'
jni/../../lib/SRC/Eden/glm.c:2577: error: undefined reference to 'glStateCacheDisableBlend'
jni/../../lib/SRC/Eden/glm.c:2587: error: undefined reference to 'glStateCacheEnableClientStateVertexArray'
jni/../../lib/SRC/Eden/glm.c:2590: error: undefined reference to 'glStateCacheEnableClientStateNormalArray'
jni/../../lib/SRC/Eden/glm.c:2592: error: undefined reference to 'glStateCacheDisableClientStateNormalArray'
jni/../../lib/SRC/Eden/glm.c:2594: error: undefined reference to 'glStateCacheClientActiveTexture'
jni/../../lib/SRC/Eden/glm.c:2597: error: undefined reference to 'glStateCacheEnableClientStateTexCoordArray'
jni/../../lib/SRC/Eden/glm.c:2599: error: undefined reference to 'glStateCacheDisableClientStateTexCoordArray'
jni/../../lib/SRC/Eden/glm.c:2613: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/glm.c:2617: error: undefined reference to 'glStateCacheEnableTex2D'
jni/../../lib/SRC/Eden/glm.c:2617: error: undefined reference to 'glStateCacheDisableTex2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:132: error: undefined reference to 'glStateCachePixelStoreUnpackAlignment'
jni/../../lib/SRC/Eden/EdenSurfaces.c:178: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:179: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:316: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:317: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:318: error: undefined reference to 'glStateCacheTexEnvMode'
jni/../../lib/SRC/Eden/EdenSurfaces.c:330: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:331: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:393: error: undefined reference to 'glStateCacheEnableClientStateVertexArray'
jni/../../lib/SRC/Eden/EdenSurfaces.c:395: error: undefined reference to 'glStateCacheEnableClientStateNormalArray'
jni/../../lib/SRC/Eden/EdenSurfaces.c:396: error: undefined reference to 'glStateCacheClientActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:398: error: undefined reference to 'glStateCacheEnableClientStateTexCoordArray'
jni/../../lib/SRC/Eden/EdenSurfaces.c:400: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:401: error: undefined reference to 'glStateCacheTexEnvMode'
jni/../../lib/SRC/Eden/EdenSurfaces.c:402: error: undefined reference to 'glStateCacheEnableTex2D'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi-v7a/libARWrapperNativeCarsExample.so] Error 1

Post Reply