graphics.h在Windows 7 64bit中的MinGW的代码块中不起作用 [英] graphics.h not working in code blocks with MinGW in windows 7 64bit

查看:278
本文介绍了graphics.h在Windows 7 64bit中的MinGW的代码块中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从以下站点设置了在CodeBlocks中执行图形代码所必需的图形文件:-

I had setup the graphics file necessary for the execution of the graphics code in CodeBlocks from the following sites:-

http://www.codewithc.com/how -在代码块中包含图形h

然后我尝试了此示例代码.

then I tried this sample code.

#include <graphics.h>
int main( )
{
     initwindow(400, 300, "First Sample");
     circle(100, 50, 40);
     while (!kbhit( ))
     {
         delay(200);
     }
     return 0;
}

但是当我在代码块中运行代码时,我得到了

but when I Run the code in code blocks I get this

任何人都可以解决我的问题吗?

Can anyone resolve my problem?

推荐答案

这是因为graphics.h是1989年Borland的BGI图形库,是为16位MS DOS计算机开发的.但是您使用的是64位Windows计算机.

This is because graphics.h is Borland's BGI graphics library from 1989, developed for 16 bit MS DOS computers. But you are using a 64 bit Windows computer.

解决方案:不要使用28年的非标准库.

Solution: don't use 28 years old, non-standard libraries.

这篇关于graphics.h在Windows 7 64bit中的MinGW的代码块中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆