我想将静态库链接到android NDK,我将libmpi.a和include文件夹复制到android项目,这里是我的Android.mk
LOCAL_PATH := $(call my-dir)
# static library info
LOCAL_MODULE_FILENAME:= libmpi
LOCAL_MODULE := libmpi
LOCAL_SRC_FILES := ../prebuilt/libmpi.a
LOCAL_EXPORT_C_INCLUDES := ../prebuilt/include
include $(PREBUILT_STATIC_LIBRARY)
# wrapper info
include $(CLEAR_VARS)
LOCAL_MODULE := androidwfpic2
LOCAL_SRC_FILES := native.c
LOCAL_STATIC_LIBRARIES := libmpi
include $(BUILD_SHARED_LIBRARY)
它编译没有错误但在运行时崩溃所以当我尝试ndk-gdb时我发现它无法看到包含文件夹的路径
Warning: workspace/AndroidWFpic2/../prebuilt/include: No such file or directory.
warning: .dynamic section for "workspace/AndroidWFpic2/obj/local/armeabi/linker" is not at the expected address (wrong library or version mismatch?)
warning: Could not load shared library symbols for 64 libraries, e.g. libstdc++.so.
我想知道如何编写路径以便它可以在运行时链接