/usr/bin/ld: cannot find : No such file or directory解決

linux gcc編程時可能出現下面的錯誤:
/usr/bin/ld: cannot find : No such file or directory
 
cannot find後面什麼都沒有,很有可能是因爲命令中間多了個空格符導致(一般在逗號後面),請仔細檢查;有的話則可能是缺少某種類型的庫,選擇安裝後即可,如下(無mysql庫導致,apt-get install libmysqlclient15-dev即可):

/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
詳細可參考:http://blog.sina.com.cn/s/blog_5cfd3adf01014w8c.html
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章