找不到c ++ graphics.h -lbgi [英] c++ graphics.h -lbgi not found

查看:421
本文介绍了找不到c ++ graphics.h -lbgi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的代码:

  #include< graphics.h> 
int main()
{
initwindow(700,700,MY First Program);
circle(200,200,150);
getch();
返回0;
}

但是我得到这个错误:

  ld ||找不到-lbgi | 
|| ===构建失败:1个错误,0个警告(0分(s),0秒)=== |

我将它添加到链接器选项以及其他内容。



我应该怎么做? colorado.edu/~main/bgi/dev-c++/libbgi.arel =nofollow>这个,并把它放到你的C编译器的 lib 文件夹中。

  -lbgi 
-lgdi32
-lcomdlg32 $ b也不要忘记添加链接器$ b -luuid
-loleaut32
-lole32

完成上述操作后,您会得到属于 initgraph()或其他的实际编译错误。



Codeblocks 13.12 。


I have this code:

#include<graphics.h>
int main( )
{
    initwindow( 700 , 700 , "MY First Program");
    circle(200, 200, 150);
    getch();
    return 0;
}

but I get this error:

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.

What should I do?

解决方案

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

After doing above, you would get the actual compile error belonging to initgraph() or other.

It is worked for me in Codeblocks 13.12.

这篇关于找不到c ++ graphics.h -lbgi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆