原文:linux undefined reference to symbol 'floor@@GLIBC_2.2.5'

這個是因為GNU make版本不一致導致,最后加上 lm g 或者gcc o main main.c lm 如果還存在問題 需要加上 Wl, no as needed g 或者gcc Wl, no as needed o main main.c lm ...

2018-03-21 16:08 0 3478 推薦指數:

查看詳情

undefined reference to symbol' pthread_create@@GLIBC_2.2.5'

我在ubuntu16.04上遷移工程,遇到了這個錯誤。 pthread庫不是Linux系統默認的庫,鏈接時需要添加-pthread參數。 這里注意是鏈接那一步添加-pthread,而不是編譯選項。 ...

Sat Oct 13 03:28:00 CST 2018 0 2393
undefined symbol: xxx - undefined reference to `typeinfo

最近的項目(so庫)用到rocksdb,之前用的rocksdb是4.3.0,編譯使用很正常。因為要升級,所以將rocksdb升級到5.13.0。 但是經過修改的項目,編譯鏈接后,ldd -r xx.so 總是會出現 undefine symbol: _ZNVTrocksdb6Logger ...

Fri Apr 19 00:53:00 CST 2019 0 1127
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM