How to use graphics.h in codeblocks?(如何在代码块中使用 graphics.h?)
问题描述
我最近开始学习 C++ 中的图形.
I have recently started learning graphics in C++.
我在代码块中的程序中尝试了 #include 但它显示错误.然后我从一个站点下载了 graphics.h 标头并粘贴到代码块中的 include 文件夹中,但它显示 graphics.h:No such file or directory代码>.
I tried #include <graphics.h> in my program in codeblocks but it shows error. Then I downloaded graphics.h header from a site and pasted in the include folder in codeblocks, yet it shows graphics.h:No such file or directory.
谁能教我如何在代码块中使用 graphics.h?
Can anyone teach me how to use graphics.h in codeblocks?
推荐答案
- 首先从 http://winbgim.codecutter.org/ 下载 WinBGIm.
- 将
graphics.h和winbgim.h文件复制到编译器目录的include 文件夹中 - 将
libbgi.a复制到编译器目录的 lib 文件夹中 - 在代码::块中打开设置>>编译器和调试器>>链接器设置单击链接库部分中的添加按钮并浏览并选择
libbgi.a文件 - 在右侧(即其他链接器选项)粘贴命令
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 - 点击确定
- First download WinBGIm from http://winbgim.codecutter.org/ Extract it.
- Copy
graphics.handwinbgim.hfiles in include folder of your compiler directory - Copy
libbgi.ato lib folder of your compiler directory - In code::blocks open Settings >> Compiler and debugger >>linker settings
click Add button in link libraries part and browse and select
libbgi.afile - In right part (i.e. other linker options) paste commands
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 - Click OK
有关详细信息,请访问此链接一>.
For detail information follow this link.
这篇关于如何在代码块中使用 graphics.h?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在代码块中使用 graphics.h?
基础教程推荐
- 初始化列表*参数*评估顺序 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- CString 到 char* 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
