與C API有關(guān)的問題 |
發(fā)布時間: 2012/8/22 17:14:03 |
與C API鏈接時,在某些系統(tǒng)上可能出現(xiàn)下述錯誤:
gcc -g -o client test.o -L/usr/local/lib/mysql -lmysqlclient -lsocket -lnsl
Undefined first referenced 電腦知識www.boydavid.com
symbol in file
floor /usr/local/lib/mysql/libmysqlclient.a(password.o)
ld: fatal: Symbol referencing errors. No output written to client
如果在你的系統(tǒng)上出現(xiàn)了該情況,必須在編譯/鏈接行的末尾增加“-lm”,通過該方式包含數(shù)學庫。 本文出自:億恩科技【www.allwellnessguide.com】 |