Graphics.h runtime error
May 20, 2014 at 4:20pm UTC
Despite having entered the library "graphics.h" in the folder "include" and the file "libbgi.a" in the "lib" folder and having linked the linker nell'immagie following the various instructions, the compiler gives me an error at runtime ...
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include <graphics.h>
int gd = DETECT, gm;
int x = 320, y = 240, radius;
initgraph(&gd, &gm, ( char*) "C:\\TC\\BGI");
for ( radius = 25; radius <= 125 ; radius = radius + 20)
circle(x, y, radius);
May 20, 2014 at 4:46pm UTC
It is because the BGI graphics expect powers that modern systems don't give out willy-nilly anymore.
To use the old <graphics.h> library, your options are:
(1) Run your program in
, and x86 emulator
(2) Get a modern compiler (MinGW) and use
The first solution is far easier.
The only other options are to get a modern compiler and use a modern graphics library, like Allegro.
Topic archived. No new replies allowed.