[Error] ld returned 1 exit status

#include<stdio.h>
#include<graphics.h>

int main()
{
initgraph(600,600);
getch();
closegraph();
return 0;
}

编译出现F:\Desktop\编程\devc++\collect2.exe [Error] ld returned 1 exit status
怎么办?希望有大佬解答。

这个应该不会报错呀,你是不是没有graphics图形库。

graphics.h是TC的针对DOS下的一个C语言图形库,如果要用的话应该用TC的编译器来编译,VC++环境有其它的针对Windows的图形库如果有需要在VC及VS环境中使用graphics.h的功能,可以下载安装EasyX图形库

环境是win10的 dev c++5.11版本