graphics.h in vs code

1k Views Asked by At

enter image description hereI tried to run following code: using tdm-gcc32bit compiler in terminal typing ./test then it runs successfully.

code:

#include<graphics.h>

int main()
{
    int gd=DETECT,gm;
    
    initgraph(&gd,&gm,(char*)"");
    
//  left defines distance of pixel from left to circumference, top id distance from top of screen and radius is simply radius of circle
    int left=200,top=150,radius=15;  
    
    circle(left,top,radius);
//  circle()
    
    getch();
    
    closegraph();

return 0;

}

But when I press runcode button it gives error: C:/Program Files (x86)/ Embarcadero/Dev-Cpp/TDM-GCC-64/ bin/../lib/gcc/x86_64-w64-mingw32/ 9.2.0/../../../../ x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files (x86)/Embarcadero/Dev-Cpp/ TDM-GCC-64/bin/../lib/gcc/ x86_64-w64-mingw32/9.2.0/../../../ libbgi.a when searching for -lbgi

CAN ANYONE HERE TO FIX THIS ERROR?enter image description here

0

There are 0 best solutions below