Android 编译STL模块相关错误解决(3)

3、预编译静态库:

build/core/base_rules.mk:81: * Each module must use a LOCAL_MODULE_TAGS in its
build/core/base_rules.mk:82: * Android.mk. Possible tags declared by a module:
build/core/base_rules.mk:83: *
build/core/base_rules.mk:84: *    optional, debug, eng, tests, samples


修改build\core下的文件definitions.mk

define include-prebuilt
    include $$(CLEAR_VARS)
    LOCAL_SRC_FILES := $(1)
    LOCAL_BUILT_MODULE_STEM := $(1)
    LOCAL_MODULE_SUFFIX := $$(suffix $(1))
    LOCAL_MODULE := $$(basename $(1))
    LOCAL_MODULE_CLASS := $(2)
    LOCAL_MODULE_TAGS := optional  // 加上这句话即可
    include $$(BUILD_PREBUILT)
endef

预编译静态库指令:

LOCAL_PATH:= $(call my-dir)


include $(CLEAR_VARS)
$(call add-prebuilt-files, STATIC_LIBRARIES, libboost_filesystem.a)
$(call add-prebuilt-files, STATIC_LIBRARIES, libboost_system.a)
$(call add-prebuilt-files, STATIC_LIBRARIES, libboost_thread.a)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/0748d5dbef11c19cf343ec323623e376.html