1. 程式人生 > >ubuntu 12.04 codeblocks undefined reference to ‘pthread_create'解決方法

ubuntu 12.04 codeblocks undefined reference to ‘pthread_create'解決方法

settings---》compiler and bug settings --》link settings 在左邊新增libpthread.a  ,右邊新增 -lpthread即可。

ubuntu libpthread.a 的路徑為 /usr/lib/x86_64-linux-gnu/libpthread.a