easyX运行报错

0

win10系统。

官网下载的最新版easyX(2019-5-29)

使用的是2009版本VC6.0

测试用例:

#include <graphics.h>
#include <conio.h>

void main()
{
	initgraph(640, 480);	// 这里和 TC 略有区别
	circle(100, 100, 60);	// 画圆,圆心(100, 100),半径 60
	getch();				// 按任意键继续
	closegraph();			// 关闭图形界面
}

报错:

c:\program files (x86)\microsoft visual studio\vc98\include\graphics.h(32) : error C2146: syntax error : missing ';' before identifier 'initgraph'
c:\program files (x86)\microsoft visual studio\vc98\include\graphics.h(32) : error C2501: 'HWND' : missing storage-class or type specifiers
c:\program files (x86)\microsoft visual studio\vc98\include\graphics.h(32) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

qq.obj - 3 error(s), 0 warning(s)

双击报错后出现一个窗口,箭头指向下面代码

HWND initgraph(int* gdriver, int* gmode, char* path);

谢谢!

ava

2020-1-2

0

1. vc6 是 1998 年发布的,没有 2009 版本的 vc6。如果网上有,那也是第三方打包的,会有各种问题,不推荐使用。

2. win10 下使用 vc6 本来就有很多问题。请参考文章:https://codebus.cn/yangw/post/warning-about-vc6

ava
慢羊羊

2020-1-2

技术讨论社区
相关提问