我正在構建一個可執行檔案(GNUstep)。
它取決于libLibname.a靜態庫。
在可執行檔案的 GNUmakefile 中,我libLibname.a像這樣鏈接:
executableToolName_LDFLAGS = /usr/GNUstep/Local/Library/Libraries/libLibname.a
它聲稱鏈接沒有錯誤:
Linking tool executableToolName ...
問題:似乎沒有找到符號:
main.m:29: error: undefined reference to '._OBJC_REF_CLASS_SomeClassNameOfLibLibname'
uj5u.com熱心網友回復:
..._LDFLAGS僅適用于庫目標。
對于工具目標,鏈接庫必須列在 中ADDITIONAL_OBJC_LIBS,前綴為-l
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/329181.html
上一篇:按位包含或在Swift中
