天天看點

eclipse使用pthread.h遇到“pthread_create”未定義的問題。

解決方法: 

a.需要在編譯時添加-lpthread參數 

$ g++ XXXXX.cpp -lpthread -o XXXXX.o 

b.在eclipse中配置 

project>properties>c/c++Build>GCC C++Linker>Libraries 

在Libraries(-l)中添加pthread 

在Libraries search path(-L)中添加crypto