Visual C++ 6.0错误:error C2065: '_beginthreadex' : undeclared identifier 的解决办法

error C2065: '_beginthreadex' : undeclared identifier 的解决办法

在VC下编译多线程程序时,经常加入了头文件#include<process.h>,编译时还是出现error C2065: '_beginthreadex' : undeclared identifier 的问题,原因是VC打开时编译程序时,工程中设置的单线程,所以要更改工程中的设置。
    具体步骤如下(见下面红字):
 

     将工程按照下面的方式进行设置后重新编译,问题就可以解决:

    Project->Settings->C/C++->Code Generation->Use run-time libray->Debug Multithread,或 Multithread,或 Debug Multithread DLL, 或 Multithread DLL都可以,即Use run-time library需要使用多线程的。

猜你喜欢

转载自blog.csdn.net/zhuo_xiao/article/details/80049223