+ 1
How to add graphics.h in Devc++
I refrenced through many videos but didnot find anyone helpful .I am using Windows 10 and Dev c++ 5.11
4 odpowiedzi
+ 5
@kurwius there's a (fan-made?) version of BGI graphics that works on windows. It even has mouse and keyboard support. I tested it out of curiosity about a year ago in MinGW Studio and CodeBlocks, on windows 7. The instructions were on the site where I downloaded it, you had to put the .h files in the include folder of MinGW, the .a file in the lib folder, link the lib with your project... the usual stuff when using a library. I'm on the phone, about to fall asleep now, but maybe this is a starting point for someone willing to help. If not, maybe I'll return in the morning with a more useful answer.
+ 2
Download from http://winbgim.codecutter.org/
Copy graphics.h and winbgim.h to the include directory of DevCpp\MinGW32, libbgi.a to the lib directory, and in your project press Alt-P, choose the Parameters tab and copy the following into the Linker area:
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
I just tested it with DevCpp 5.2.0.1 on win 7.
Although kurwius is probably right (I bookmarked that link), I can't deny the simplicity of this lib. I made a rudimentary drawing program with saving capability in less than 20 lines. I found a mistake in graphics.h though: at line 302, in function printImage() some parameters are left, right, right <- see, redefinition. They should be left, top, right. (I also happen have an older version of the lib and that one didn't have the mistake, was smaller and only needed -lbgi to the linker; but i can't find it anywhere for download anymore; oh well)