下载eaxyX库之后,只要定义头文件#include <graphics.h> 就会报错

0

下载eaxyX库,执行程序

#include <graphics.h> // 就是需要引用这个图形库
#include <conio.h>
void main()
{
initgraph(640, 480); // 这里和 TC 略有区别
circle(200, 200, 100); // 画圆,圆心(200, 200),半径 100
getch(); // 按任意键继续
closegraph(); // 关闭图形界面
}

错误如下

c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(1091) : error C2146: syntax error : missing ';' before identifier 'KSPIN_LOCK'
c:\program files (x86)\microsoft visual studio\vc98\include\winnt.h(1091) : fatal error C1004: unexpected end of file found

看了winnt.h头文件,并不是缺少“;”的问题,在网上也没有找到具体的答案

就大佬帮忙,真心感谢

ava
樛の木

2019-12-16

0

两点建议:

1. 重新创建项目,不要复制粘贴文件,也不要复制粘贴代码,而是按照流程创建项目后自己敲一遍所有字符。

2. 如果你一定要用 vc6,请不要使用精简版的 vc6,更不要使用汉化版的 vc6,都不稳定。

ava
慢羊羊

2019-12-17

技术讨论社区
相关提问