c++ graphics.h -lbgi not found(c++ graphics.h -lbgi not found)
问题描述
我有这个代码:
#include<graphics.h>
int main( )
{
initwindow( 700 , 700 , "MY First Program");
circle(200, 200, 150);
getch();
return 0;
}
但我收到此错误:
ld||cannot find -lbgi|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
我将它添加到链接器选项以及其他内容中.
I added it to linker options and also the other things.
我该怎么办?
推荐答案
下载 this 并将其放入 C 编译器的 lib 文件夹中.也不要忘记添加链接器:
Download this and put it in your C compiler's lib folder. Also do not forget to add in the linkers:
-lbgi
-lgdi32
-lcomdlg32
-luuid
-loleaut32
-lole32
执行上述操作后,您将获得属于initgraph() 或其他的实际编译错误.
After doing above, you would get the actual compile error belonging to initgraph() or other.
它在 Codeblocks 13.12 中对我有用.
It is worked for me in Codeblocks 13.12.
这篇关于c++ graphics.h -lbgi not found的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:c++ graphics.h -lbgi not found
基础教程推荐
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 初始化列表*参数*评估顺序 2021-01-01
- CString 到 char* 2021-01-01
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
