PDA

View Full Version : makefile problem



Rou_Prog94
09-15-2017, 03:24 AM
Hi,
Im trying to make some simple graphics in Devc++ and when I compile and run my program this error appears

C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe cannot find -lbgi
C:\Users\Roula\Desktop\grafika\collect2.exe [Error] ld returned 1 exit status
25 C:\Users\Roula\Desktop\grafika\Makefile.win recipe for target 'example1.exe' failed

any help?
thank you

Dark Photon
09-15-2017, 06:03 AM
Im trying to make some simple graphics in Devc++ ...
when I compile and run my program this error appears

...\x86_64-w64-mingw32\bin\ld.exe cannot find -lbgi

While graphics, this doesn't really have anything to do with OpenGL.

Your error suggests that your linker (ld.exe) cannot locate a library named "libbgi.a" or "libbgi.so" anywhere in your link library search path. You can probably fix this problem by either: 1) telling the linker to look in the directory containing the library by adding a "-L" option (e.g. "-L/some/path -lbgi"), OR instead providing a full path to the library instead of "-lbgi" on the linker line (e.g. "/some/path/libbgi.a").

So, find libbgi.a or libbgi.so on your system, and then give that path to the linker so it can use it to find that library.

Related:


Using the WinBGIm Graphics Library with Dev-C++ (https://www.cs.colorado.edu/%7Emain/bgi/dev-c++/)
Topic: ERROR: ld: cannot find -lbgi (http://forums.codeblocks.org/index.php?topic=19227.0)
WinBGIm - Borland BGI Graphics emulation for the MingW (GCC port) Compiler (http://winbgim.codecutter.org/)
Borland Graphics Interface (BGI) for Windows (http://www.cs.colorado.edu/%7Emain/cs1300/doc/bgi/bgi.html)