由于#include< graphics.h>而导致的错误 [英] Error due to #include<graphics.h>
问题描述
我试图编译一个包含C的 graphics.h
头文件的程序。我添加了 graphics.h
和 winbgim.h
include文件夹中的头文件,还有 libbgi.a
到lib文件夹。 / p>
仅用于测试,我制作了一个简单的Hello World程序,并包含 graphics.h
头文件。
但在编译时出现以下错误:
在firstc.c包含的文件:2:0:
c:\mingw\bin ../ lib / gcc / mingw32 / 4.7.1 /../../../../ include / graphics.h:30:59 :
致命错误:sstream:没有这样的文件或目录编译
终止。
我尝试搜索其他论坛,以及同样的问题已经被问到,但无法得到答案。另一个问题,我遇到了C和C ++的其他图形选项,如openGL和DirectX。我应该学习这些而不是graphics.h吗?
graphics.h
是一个非标准的标题。它很可能是指Turbo C DOS编译器的旧BGI图形库。它只适用于特定的编译器。如果您对3D图形编程感兴趣,那么OpenGL和/或DirectX确实是更好的现代替代方案,它受到了以下支持:*支持许多编译器。
I am trying to compile a program which includes the graphics.h
header file for C. I have added the graphics.h
and winbgim.h
header files in the include folder and also libbgi.a
to lib folder.
Just for testing, I made a simple hello world program and included the graphics.h
header file.
But on compiling I got the following error:
In file included from firstc.c:2:0: c:\mingw\bin../lib/gcc/mingw32/4.7.1/../../../../include/graphics.h:30:59: fatal error: sstream: No such file or directory compilation terminated.
I tried to search in other forums as well, where the same question had been asked, but could not get an answer.
Another question, I came across other graphic options for C and C++ like openGL and DirectX. Should I learn these instead of graphics.h?
graphics.h
is a non-standard header. Most likely it refers to the old BGI graphics library of the Turbo C DOS compiler. It will only work on that particular compiler. And of course DOS is a completely obsolete OS nowadays.
If you are interested in 3D graphics programming, then OpenGL and/or DirectX are indeed better, modern alternatives, supported by many compilers.
这篇关于由于#include< graphics.h>而导致的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!