Open merajmasuk opened 2 years ago
I ran the following commands on cmd.exe
> cd WinBGIm-64
> set PATH=%PATH%;C:/Program Files/CodeBlocks/MinGW/bin
> cmake -G "MinGW Makefiles"
> cmake --build .
Hi Sorry for late reply. Were you able to solve your issue? I also faced it with newer version of GCC not finding 'graphics.h' directly from MinGW include . In that case , I moved graphics.h to the directory which contains other header files like 'iostream' or 'stdio.h' . They are in there somewhere ,a simple search can show the location , then just copy 'graphics.h' header there.
Sorry, I went with 32 bit version. But I'm still eager to solve the issue and leave note for future readers.
And yes, I copied the graphics.h header to C:/Program Files/CodeBlocks/MinGW/include
. This is where it is supposed to go. Also the libbgi.a to the C:/Program Files/CodeBlocks/MinGW/lib
folder. But simply doing this didn't help.
Let's try this Copy WinBGIm-64\libbgi\include\bgi\graphics.h and WinBGIm-64\libbgi\include\bgi\winbgim.h to the directory containing 'stdio.h' file which for 64 bit installation happens to be CodeBlocks/MinGW/x86_64-w64-mingw32/include
Let me know if it works
To make outtextxy and all other text display functions work, you'll need to recompile the project in C++14.
Hi, I was able to compile a graphics source file with graphics.h and the source being in the same directory. My current code is below (I didn't call any function as I'm just testing if the library is able to include):
But I am not satisfied with this. My next goal is to be able to include graphics.h globally, rather than in a single project locally. My target is as follows:
But I'm receiving error such as "fatal error: graphics.h: No such file or directory".
To obtain second result, I copied WinBGIm-64\libbgi\include\bgi\graphics.h and WinBGIm-64\libbgi\include\bgi\winbgim.h to C:/Program Files/CodeBlocks/MinGW/include and WinBGIm-64\libbgi\libbgi.a to C:/Program Files/CodeBlocks/MinGW/lib. Then I ran the program.
My linker flags: