vc多线程编程 error C2065: '_beginthread' : undeclared identifier

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:31   3134   0

VC多线程编程时,在include process.h的情况下,还会出error C2065: '_beginthread' : undeclared identifier

这样的error信息。主要是配置文件的问题。

Project -> Settings... 中
选C/C++ 的页,然后在Category中选Code Generation
然在它下面的Use run-time libaray 中选Multithreaded(或 Multithreader DLL
或 Debug Multithreader DLL 或 Debug Multithreader )

保存settings,再 build 一次就ok了.

另外还要注意的是,在DEBUG编译模式下,如果Use run-time libaray项选择了Multithreaded,

会出错:error LNK2001: unresolved external symbol __CrtDbgReport

Use run-time libaray项选择应该选用Debug Multithreader DLL 或 Debug Multithreader。

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP