Android上如何使得a.cpp生成两个静态库(libA.a and libB.a)

fredhurui 2013-12-13 10:39:16
我期待用a.cpp生成两个静态库(libA.a and libB.a).
于是我撰写了如下makefile,但是build 不过,请问有什么办法可以达到我的要求吗?


LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := a.cpp

LOCAL_MODULE := libA

include $(BUILD_STATIC_LIBRARY)

#######################33

include $(CLEAR_VARS)

LOCAL_SRC_FILES := a.cpp
LOCAL_C_FLAGS := -DTest
LOCAL_MODULE := libb

include $(BUILD_STATIC_LIBRARY)
...全文
163 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
默默无言_ 2013-12-14
  • 打赏
  • 举报
回复
arm-linux-androideabi-ar -r -o liba.a a.o位置写反了
默默无言_ 2013-12-14
  • 打赏
  • 举报
回复
也许可以用 arm-linux-androideabi-gcc -c a.cpp arm-linux-androideabi-ar -r a.o -o liba.a 瞎猜的哈

80,472

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧