ullaskunder3 / Solution-to-graphics.h

My vs code setup for graphics.h ( I know its old, have to learn because of university they use turbo 😱. Vs code is way better 😍)
https://ullaskunder3.github.io/Solution-to-graphics.h/
47 stars 41 forks source link

Graphics.h doesn't work with gcc (Rev1, Built by MSYS2 project) 11.3.0 #8

Closed Prakash4844 closed 2 years ago

Prakash4844 commented 2 years ago

Hey first of all I would like to express gratitude to this repo and its author.

I tried to set up graphic.h and in Visual Studio code, but code doesn't compile with the following error.

> Executing task: C/C++: g++.exe build active file <

Starting build...
C:\msys64\mingw64\bin\g++.exe -g "D:\Users\Zaphkil!\Documents\VS Code\C++ Graphics\Home\src\example.cpp" -o "D:\Users\Zaphkil!\Documents\VS Code\C++ Graphics\Home\build\example.exe" -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib\libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../..\libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib\libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lbgi: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib/libbgi.a when searching for -lbgi
collect2.exe: error: ld returned 1 exit status

Build finished with error(s).

Terminal will be reused by tasks, press any key to close it.

I am using gcc which was downloaded through msys2.

graphics.h works as intended with gcc 6.3.0 that is downloaded through mingw64 installer.

How can i fix this issue?

ullaskunder3 commented 2 years ago

Thanks... :)

suggestion:


Let me know :)👍

Prakash4844 commented 2 years ago

Hey Thanks for quick reply, Yes it is working with gcc 6.3.0 installed via Old MinGW Installer.

Graphics.h in VS Code

Should i close this issue, sorry, this is first time i am using issues feature of github.

ullaskunder3 commented 2 years ago

It's good to hear that... keep it up :) 👍