Menu

DevC++ Compile error, missing -lbgi

2020-09-01
2023-05-08
  • Serious Coder

    Serious Coder - 2020-09-01

    A newbie coder, just trying to learn. Installed DevC++ and configured it. Just trying to compile a simple graphics program :

    #include <iostream>
    #include <conio.h>
    #include <graphics.h>
    int main()
    {
        int gd=DETECT,gm;
        initgraph(&gd,&gm,"C:\\Tc\\BGI");
        setfillstyle(SOLID_FILL,BROWN);
        fillellipse(310,160,80,50);
        ellipse(310,160,110,109,80,50);
        setfillstyle(SOLID_FILL,BROWN);
        fillellipse(400,160,20,20);
        circle(400,160,20);
        setcolor(RED);
        arc(468,150,80,180,50);
        arc(468,165,180,290,50);
        ellipse(355,136,120,284,105,23);
        ellipse(355,185,77,240,105,23);
        arc(310,70,300,40,50);
        arc(270,67,300,40,50);
        arc(282,221,300,15,60);
        arc(240,224,300,15,60);
        circle(410,170,3);
        circle(410,150,3);
        getch();
        return 0;
    }
    

    Getting the following errors :

    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/lib\libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib\libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib\libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../lib\libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib\libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../..\libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe skipping incompatible C:/Program Files (x86)/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../libbgi.a when searching for -lbgi
    C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe cannot find -lbgi
    C:\Users\Acyr\Documents\C++ Code\collect2.exe [Error] ld returned 1 exit status
    25 C:\Users\Acyr\Documents\C++ Code\Makefile.win recipe for target 'Test.exe' failed

    Would appreciate any help / advice. Thanks.

     
  • nonlinearly

    nonlinearly - 2020-09-02

    I think that the compiler you use (MinGW64) does not contain conio library. Conio library has to do with turbo c++ compiler

     

    Last edit: nonlinearly 2020-09-02
  • Ioannis Dimitriou

    I 'm facing the same problem. I did everything so many times but nothing seems to change. What about you?

     
  • mike foe

    mike foe - 2023-05-08

    I believe that the conio library is not present in the compiler you use (MinGW64). Turbo C++ compiler is associated with the Conio library.

     

Log in to post a comment.