[問題] android.mk引用的問題

作者: weiching5566 (就醬子吧)   2016-03-22 18:13:15
我的架構如下
ABC/
Android.mk
src/main.cpp
lib/armeabi/a.so
inc/a.h
Android.mk的寫法如下
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := a
LOCAL_SRC_FILE := $(LOCAL_PATH)/armeabi/a.so
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc
LOCAL_SHARED_LIBRARY := a
LOCAL_SRC_FILES := src/main.cpp
LOCAL_MODULE := libtest
include $(BUILD_EXECUTE)
這時會發生undefined reference to a.so(or a.h)裡面的interface
但如果我把它build成static library
如include $(BUILD_STATIC_LIBRARY)就可以build過
不知道要build成exe檔該如何做
謝拉
作者: mshockwave (夏克維夫)   2016-03-23 08:45:00
第一個改成 include$(PREBUILT_SHARED_LIBRARY)其餘不變就可以了
作者: chiwa (我是青蛙,不是王子^_^)   2016-04-03 18:19:00
沒記錯的話,有些typo, LOCAL_SHARED_LIBRARIES := XXX,還有是$(BUILD_EXECUTABLE),寫錯的話展開會是空的

Links booklink

Contact Us: admin [ a t ] ucptt.com