linux 中 eclipse 开发 c/c++ 多线程程序,添加 libpthread.a 库支持


 

导入头文件

在 linux 中开发多线程程序,在使用到 pthread 系列函数的文件中,需要导入头文件:

#include <pthread.h>

 

链接 libpthread.a 

在编译的时候,需要链接 libpthread.a 库

eclipse 中添加 libpthread.a 库:
Project -> Properties -> C/C++ Build -> Settings -> GCC C Linker -> Libraries
1. 在 Libraries(-l) 中添加 pthread
2. 在 Libraries search path(-L) 中添加 crypto

 

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM