與C API有關的問題 |
發布時間: 2012/8/22 17:14:03 |
與C API鏈接時,在某些系統上可能出現下述錯誤:
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
如果在你的系統上出現了該情況,必須在編譯/鏈接行的末尾增加“-lm”,通過該方式包含數學庫。 本文出自:億恩科技【www.vbseamall.com】 |