'graphics.h not working in code blocks with MinGW in windows 7 64bit
I had setup the graphics file necessary for the execution of the graphics code in CodeBlocks from the following sites:-
http://www.codewithc.com/how-to-include-graphics-h-in-codeblocks
then I tried this sample code.
#include <graphics.h>
int main( )
{
initwindow(400, 300, "First Sample");
circle(100, 50, 40);
while (!kbhit( ))
{
delay(200);
}
return 0;
}
but when I Run the code in code blocks I get this


Can anyone resolve my problem?
Solution 1:[1]
This is because graphics.h is Borland's BGI graphics library from 1989, developed for 16 bit MS DOS computers. But you are using a 64 bit Windows computer.
Solution: don't use 28 years old, non-standard libraries.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
