2
我正打算將靜態Linux .a庫用戶變成android。 我使用以下鏈接創建了靜態.a文件http://codingfreak.blogspot.in/2010/01/creating-and-using-static-libraries-in.htmlandroid build static lib
我的Android應用程序中有以下Android.mk文件。
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE:= first-prebuilt
LOCAL_SRC_FILES:= libarith.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := test-main
LOCAL_STATIC_LIBRARIES := first-prebuilt
LOCAL_SRC_FILES := native.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)
當我使用ndk-build r7b構建應用程序時,它會給出以下錯誤。
Сompile++ thumb : test-main <= native.cpp
SharedLibrary : libtest-main.so
/home/hiren/NDK-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: /home/hiren/workspace/VideoTEST/obj/local/armeabi/libarith.a(addition.o): Relocations in generic ELF (EM: 3)
/home/hiren/workspace/VideoTEST/obj/local/armeabi/libarith.a: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [/home/hiren/workspace/VideoTEST/obj/local/armeabi/libtest-main.so] Error 1
誰能幫助,我堅持了很長一段時間,在這裏... 在此先感謝。
我不知道在哪裏寫上述鏈接的代碼,,這是什麼,..有什麼替代方法來實現我的目標.. ..? – 2012-04-06 10:49:47
這是什麼意思** android格式**? – 2016-05-10 14:08:27
針對Android(針對boinc和Android平臺),不針對您的主機系統。 – plaisthos 2016-05-11 08:44:21