码迷,mamicode.com
首页 > 移动开发 > 详细

Android.mk中引用第3方动态库

时间:2016-07-13 23:09:45      阅读:599      评论:0      收藏:0      [点我收藏+]

标签:

Android.mk 文件内容:

 

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES:= \
  testH264VideoStreamer.cpp


LOCAL_MODULE := live555_stream
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_STATIC_LIBRARIES := libcutils libc

 

 

LOCAL_C_INCLUDES += $(LOCAL_PATH)/liveMedia/include \
             $(LOCAL_PATH)/groupsock/include \
             $(LOCAL_PATH)/UsageEnvironment/include \
             $(LOCAL_PATH)/BasicUsageEnvironment/include


LOCAL_SHARED_LIBRARIES := \
            libcutils libutils


#LOCAL_SHARED_LIBRARIES := liblive555
LOCAL_LDFLAGS += $(LOCAL_PATH)/liblive555.so

#LOCAL_STATIC_LIBRARIES += libstlport_static libstdc++ libm libc

include $(BUILD_EXECUTABLE)

 

注意: 引用第三方动态库*.so, 不能用LOCAL_SHARED_LIBRARIES := liblive555这种方式,否则会报错:

         make: *** No rule to make target `out/target/product/rk312x/obj/SHARED_LIBRARIES/liblive555_intermediates/export_includes‘, needed by `out/target/product/rk312x/obj/EXECUTABLES/live555_stream_intermediates/import_includes‘.  Stop.

        只有系统的库,才能这样引用。切记! 

文件目录结构:

技术分享

 

 这个问题郁闷我半个多小时,特此写下来,与大家共享,也算是记了笔记了。

 

Android.mk中引用第3方动态库

标签:

原文地址:http://www.cnblogs.com/Jade2009/p/5667899.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!