Library compilation for android arm64

Hi.

So i’m using a C library with an addon, works great on android-arm7.

But i’m trying to make a arm64 android build, which builds, however android studio cannot finalize linking, says :

 error adding symbols: File in wrong format
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

:linkOFAndroidAppArm64-v8aReleaseArm64SharedLibrary FAILED

FAILURE: Build failed with an exception.

The library uses ./configure

I tried to see how oF does arm64 builds, and managed to alter the library’s configure script to add an option to compile armeabiv8a. The library has android support for android mips, eabi, arm7 (which works for me).

For adding the option in the configure script I used:

if test “$target_cpu” = “armeabiv8a”
then
ANDROID_TOOLCHAIN=“arm-linux-androideabi-$ANDROID_GCC_VERSION”
ANDROID_NDK_SYSROOT="$ANDROID_NDK_PLATFORM_PATH/arch-arm"
// ANDROIDBIN="$ANDROID_NDK/toolchains/arm-linux-androideabi-$ANDROID_GCC_VERSION/prebuilt/linux-x86/bin/arm-linux-androideabi"
ANDROIDBIN="$ANDROID_NDK/toolchains/arm-linux-androideabi-$ANDROID_GCC_VERSION/prebuilt/linux-x86_64/bin/arm-linux-androideabi"
CFLAGS="$CFLAGS -fpic -march=armv8-a -O3 -DANDROID --sysroot=$ANDROID_NDK_SYSROOT"
// CFLAGS="$CFLAGS -fpic -march=armv7-a -mfloat-abi=softfp -O3 -DANDROID --sysroot=$ANDROID_NDK_SYSROOT"
// LDFLAGS="$LDFLAGS -Wl,–fix-cortex-a8"
fi

However, this builds the .a files ok, but produces the above error. Any ideas would be most welcome. Thank you.