macos 如何在我的 mac 上添加 graphics.h 库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4881649/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 07:41:29  来源:igfitidea点击:

How can I add graphics.h library on my mac?

cmacoslibraries

提问by Praveen

I want to draw a rectangle using a C program. So I was trying to use the graphics.hheader. But the GCC compiler gave me a error saying that the library could not be found.

我想使用 C 程序绘制一个矩形。所以我试图使用graphics.h标题。但是GCC编译器给了我一个错误,说找不到库。

I'll appreciate if some one can help me with this.

如果有人可以帮助我,我将不胜感激。

采纳答案by karlphillip

graphics.his a header that define functions for libbgi(Borland Graphics Interface)

graphics.h是为libbgi(Borland 图形接口)定义函数的头文件

Unless you have a Borland compiler of some sort installed on your Mac (if that's even possible), I think you'll end up having to use other graphic libraries, or install a Windows/Linux Virtual Machine on your Mac and then run/compile your code inside it.

除非您在 Mac 上安装了某种 Borland 编译器(如果可能的话),我认为您最终将不得不使用其他图形库,或者在您的 Mac 上安装 Windows/Linux 虚拟机,然后运行/编译你在里面的代码。

回答by templatetypedef

graphics.his not a standard C header and is probably a part of a custom library. If you can track down that original library and provide more info, we can probably help you get it set up.

graphics.h不是标准的 C 头文件,可能是自定义库的一部分。如果您可以找到那个原始库并提供更多信息,我们可能会帮助您设置它。