0

当我尝试运行简单的图形代码时,我不断收到此错误。而且我认为问题不在于代码本身。

Desktop\CG> g++ -w bres-circle.cpp -o bres-circle -lgraph
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgraph
collect2.exe: error: ld returned 1 exit status

这是代码:

#include <iostream>
#include <graphics.h>

using namespace std;

int main()
{
    int gd = DETECT, gm;
    initgraph(&gd, &gm,"");

    line(100,100,200,200);
    closegraph();
}

4

0 回答 0