高分请教Dev-c++的问题。

cjxiaoh 2002-08-19 04:31:10
我在Dev-c++中编译包含GRAPHICS.H头文件的程序时总是有问题,例如出现no such file
or directory.如果我在将这个头文件拷贝到include中的时候又会出现其它的问题。不是
说Dec-c++调用的是gcc,编译调试环境很好吗,怎么DOS下的clrscr()也不支持呢?希望Dev-c++高手指点一下。
...全文
47 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ashchan 2002-08-19
  • 打赏
  • 举报
回复
因为graphics.h是Borland TC的专用库,并不是C/C++标准库。楼上那位找的英文说明已经很明白了。
zjia2 2002-08-19
  • 打赏
  • 举报
回复
please reference the Dev-C++ Tutorial

URL http://www.geocities.com/uniqueness_template/
How do I use Borland Graphics Interface (graphics.h)?
For those of you migrating from Borland, you may be wondering where graphics.h is. Unfortunately, graphics.h is a Borland specific library and cannot be used with Dev-C++. Fortunately, a benevolent soul by the name of Michael Main has modified a BGI emulation library for Windows applications (originally written by Konstantin Knizhnik) to be used under MinGW (and Dev-C++) which he has aptly named WinBGIm.

The files we need are:
winbgim.h (download to /Dev-C++/include)
winbgim.cpp (download to /Dev-C++/include)
libbgi.a (download to /Dev-C++/lib)


After you have downloaded the files to the correct locations, you can now use winbgim.h as you would graphics.h with a few caveats.

Using library files:
First, you have to tell Dev-C++ where to find the library functions that WinBGIm references--this is done in the "Project Options" dialog box.
Here are instructions on how to do this with a new project:


Follow step 2 and step 3 of "Using Dev-C++".
Go to "Project" menu and choose "Project Options" (or just press ALT+P).
In the "Further object files or linker options" field, enter: -lbgi -lgdi32

Click "OK".
Follow step 4, step 5 and step 6 of "Using Dev-C++".
BGI and WinBGIm differences:
WinBGIm is a superset of BGI and as such may have functions and features with which you are unfamiliar. See Michael Main's BGI Documentation for more information.

if you stiil can not complier it, and the error message is multiple define the color, then you must note the enum of graphics.h
fangrk 2002-08-19
  • 打赏
  • 举报
回复
可能是这样的:
graphics.h是dos下的,Dev-c++是32位的,所以不支持
jinleivinus 2002-08-19
  • 打赏
  • 举报
回复
查看一下你的VC头文件包含路径是不是包含少了,所以no such file or directory
cpmagic 2002-08-19
  • 打赏
  • 举报
回复
什么是Dev-c++啊?

69,371

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧