CDT build console:
18:35:13 **** Incremental Build of configuration Debug for project 1 ****
Info: Internal Builder is used for build
g++ -o 1.exe "src\\1.o"
d:/c++/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread
collect2.exe: error: ld returned 1 exit status
18:35:13 Build Finished (took 156ms)
问题解决,在新建工程时,Chain 选择 Microsoft Visual C++ ,这样子可以成功运行.之前使用的MinGW,可是那样子会出问题,也不知道为什么
看看 Linker for DLL 和Linker for Lib有没有什么问题
又是你啊,关键我没有你这个环境你看看这篇文章http://blog.csdn.net/sdc6882278/article/details/8030002
主要注意一下这个配置,看看你的是什么样的
找不到libpthread.a或者libpthread.so这个库,你把这个库文件所在的路径加入编译器的Library搜索路径中就好了。