-1

I am using MinGW64 for compile my codes. How to use the graphics library in Dev-C++(MinGW64) in Windows? Or write a simple example?

sohrab
  • 11
  • 1
  • 1
    what graphics library? you mean BGI/WinBGI? What windows? what is the exact problem you having? – Spektre Jun 25 '22 at 07:48
  • 1-graphics.h 2-i do not know. 3-windows10 4-i cant use rectangle function for draw a rectangle. – sohrab Jun 27 '22 at 11:56
  • `graphics.h` header is very common filename in any gfx api the real name of lib you using is important if your code has something like `int gdriver = DETECT, gmode; initgraph(&gdriver, &gmode, "");` then its BGI however ancient BGI was designed for MS-DOS in order to run such code in win10 you need a win10 compatible port of BGI for example WinBGI is old windows port (not sure if it runs on win10 I never used it) in order to use it you have to download such lib and properly link it to your executable see probable [duplicate of yours](https://stackoverflow.com/a/72673653/2521214) – Spektre Jun 27 '22 at 12:06
  • also beware any BGI port you found will be most likely 32bit so you have to compile your program as win32 executable too ... – Spektre Jun 27 '22 at 12:07

1 Answers1

0

Dev-C++ hasn't released any new versions in the last 7 years. I think this software was abandoned. I used Dev-C++ a long time ago to, but I switched to Code::Blocks and I remember the transition was very smooth.

I made a short explanation on how to configure MinGW-w64 in Code::Blocks at https://winlibs.com/#usage-codeblocks and I assume it should be quite similar in Dev-C++.

As for graphics.h: this is not part of MinGW-w64, but the following projects provide it:

Both these packages can be built with MinGW-w64.

Brecht Sanders
  • 6,215
  • 1
  • 16
  • 40