我正在尝试使用FFTW
2.1.5.cpp
版本的FFTW
. 我使用 configure & make 命令对其进行了编译,并尝试将其用作预构建库。在我的NDK
项目中,所有内容都可以正常编译,但是在链接时出现以下错误:
Compile++ thumb : water <= vertex.cpp
Compile++ thumb : water <= face.cpp
Compile++ thumb : water <= Solver.cpp
Compile++ thumb : water <= Water.cpp
SharedLibrary : libwater.so
/Users/Xavi/Documents/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: /Users/Xavi/Documents/workspace/mmm/obj/local/armeabi/libfftw.a: no archive symbol table (run ranlib)
我的 Android.mk 代码如下
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := fftw
LOCAL_SRC_FILES := fftw/lib/libfftw.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := water
LOCAL_C_INCLUDES := $(LOCAL_PATH)/water/include
LOCAL_SRC_FILES := \
water/src/vertex.cpp \
water/src/face.cpp \
water/src/Solver.cpp \
water/src/Water.cpp
LOCAL_STATIC_LIBRARIES := fftw
include $(BUILD_SHARED_LIBRARY)
我做错了什么,还是FFTW
以不同的方式编译库更好?