gcc連接非標準(non-standard)命名庫

標準命名庫: -lnamespacespa

標準連接庫以lib開頭, 並以so/a結尾.code

exampleblog

gcc test.c -o test -L. -lhello

非標準命名庫: -l:libnameget

非標準連接庫命名就很個性了, 能夠根據本身的愛好本身命名, 但大部分是要連接庫的realname或者soname, 而不是連接linkname時用到io

exampleclass

gcc test.c -o test -L. -l:libhello.a

 

參考:test

  ld library search path for non-standard library namegcc

相關文章
相關標籤/搜索