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