红联Linux门户
Linux帮助

linux g++编译提示少pthread库

发布时间:2016-03-29 15:26:00来源:linux网站作者:Tanlon

最近g++编译一个log4cpp的使用demo,总提示少找不到pthread的函数接口,加了-lpthread也无法解决。

linux g++编译提示少pthread库

最终通过加-pthread解决该问题,注意-pthread没有l。通过检查log4cpp的makefile文件,发现内部添加了-pthread命令,在编译demo时加上-pthread即可。


本文永久更新地址:http://www.linuxdiyf.com/linux/19352.html