Re: [問題] linux上要如何 .a 和 .o 合併?

看板Programming作者 (ㄎ)時間17年前 (2009/02/28 00:15), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《nosrep (ㄎ)》之銘言: : 我使用 ar cqs mylib.a newfunc.o oldlib.a : 但是這樣好像會沒有辦法在編譯的時候辨識出來有 oldlib.a : 所以程式 linking 到 mylib.a 的時候,就會找不到 oldlib.a 的函式庫... : 有人知道該怎麼做嗎? 恩恩~查了一下資料~ AR itself does not support static libraries that contain static libraries. What you have to do, is find all the object files for those libraries, and combine them into your final libcool.a. 用 ar -x oldlib.a , 再 merge 吧....(真有點笨..) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.120.216.146
文章代碼(AID): #19g16agH (Programming)
文章代碼(AID): #19g16agH (Programming)