當前位置:
首頁 >
-lrt
發布時間:2025/6/15
47
豆豆
-lrt
在編寫pthread有關的程序時,編譯時老是報"undefined reference to `pthread_create'"的錯誤,
原因是沒有鏈接pthread相關的庫,gcc加上-lrt就可以了.
我想怎樣默認去鏈接這個庫了?不要再加個"-lrt"了
也就是"/usr/lib/"下的libpthread.a,
應該在哪個配置文件中進行配置了?
?
warning: the `gets' function is dangerous and should not be used.;
posted on 2014-03-07 15:33 秦瑞It行程實錄 閱讀(...) 評論(...) 編輯 收藏轉載于:https://www.cnblogs.com/ruiy/p/pth.html
總結
- 上一篇: 用户的创建与删除
- 下一篇: 【转】Socket状态变迁图