vs2019,“发生生成错误,是否继续并运行上次的成功的生成?” pthread库

<未解决>求大佬帮帮忙
vs2019,“发生生成错误,是否继续并运行上次的成功的生成?” pthread库
测试代码:

//功能:打印10个‘i’

#include<stdio.h>
#include<stdlib.h>
#include<pthread.h>

int main(void) {
	int i;
	for (i = 0; i < 10; i++) {
		printf("i\n");
	}
	return 0;
}

编译:没有问题
vs2019,“发生生成错误,是否继续并运行上次的成功的生成?” pthread库
运行:报错
vs2019,“发生生成错误,是否继续并运行上次的成功的生成?” pthread库
注释掉#include<pthread.h>后
源代码:

//功能:打印10个‘i’

#include<stdio.h>
//#include<stdlib.h>
#include<pthread.h>

int main(void) {
	int i;
	for (i = 0; i < 10; i++) {
		printf("i\n");
	}
	return 0;
}

编译运行:正常
vs2019,“发生生成错误,是否继续并运行上次的成功的生成?” pthread库
分析
"pthread.h"库的配备有问题

参考解决方法:
配置pthread.h:
https://blog.csdn.net/cry1994/article/details/79115394
https://blog.csdn.net/ZPeng_CSDN/article/details/114108421
配备SDKs:
https://blog.csdn.net/lwq418/article/details/102610582?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522163557554816780262575534%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=163557554816780262575534&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-2-102610582.pc_search_result_control_group&utm_term=vs2019%E5%8F%91%E7%94%9F%E7%94%9F%E6%88%90%E9%94%99%E8%AF%AF%E6%98%AF%E5%90%A6%E7%BB%A7%E7%BB%AD%E5%B9%B6%E8%BF%90%E8%A1%8C%E4%B8%8A%E6%AC%A1%E7%9A%84%E6%88%90%E5%8A%9F%E7%94%9F%E6%88%90+++%E5%BA%93&spm=1018.2226.3001.4187

上一篇:VS2019使用OpenCV过程中出现找不到opencv_world341d.dll的问题


下一篇:vs2019 添加ado数据模型步骤