Skip to content Skip to sidebar Skip to footer

Android Ndk: No Archive Symbol Table

I'm trying to port the FFTW library and some .cpp files to Android, using the 2.1.5 version of FFTW. I compiled it using the configure & make commands and I try to use it as a

Solution 1:

This is working for me.

LOCAL_PATH := $(call my-dir)
ROOT_PATH := $(LOCAL_PATH)include$(call all-subdir-makefiles)include$(CLEAR_VARS)

LOCAL_PATH = $(ROOT_PATH)
LOCAL_CFLAGS := -Wall -Wextra

LOCAL_MODULE    := water

LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
LOCAL_STATIC_LIBRARIES := fftw3
LOCAL_SRC_FILES := \
water/src/vertex.cpp \
water/src/face.cpp \
water/src/Solver.cpp \
water/src/Water.cpp

include$(BUILD_SHARED_LIBRARY)

And I used android ndk toolchain to build fftw this is my build.sh. Put this in your android project folder and run it and put fftw folder in the parent folder

#!/bin/sh# fftw3/build.sh# Compiles fftw3 for Android# Make sure you have NDK_ROOT defined in .bashrc or .bash_profile

INSTALL_DIR="`pwd`/app/jni/fftw3"
SRC_DIR="`pwd`/../fftw-3.3.4"cd$SRC_DIRexport
  PATH="<your path>/android-ndk-r11c/toolchains/arm-linux-androideabi-  4.9/prebuilt/darwin-x86_64/bin:$PATH"export SYS_ROOT="<your path>/android-ndk-r11c/platforms/android-17/arch-arm/"export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"export LD="arm-linux-androideabi-ld"export AR="arm-linux-androideabi-ar"export RANLIB="arm-linux-androideabi-ranlib"export STRIP="arm-linux-androideabi-strip"mkdir -p $INSTALL_DIR
./configure --host=arm-linux-androideabi --build=x86_64-apple-darwin --   
prefix=$INSTALL_DIR LIBS="-lc -lgcc"

make 
make install 

exit 0

And you will find fftw folder in app/jni and it will include bin, include,lib,share folders and in lib folder you will find libfftw3.a

Post a Comment for "Android Ndk: No Archive Symbol Table"