graphics.h

when I write any code using a functin in <garphics.h> ,compiler givs o error.
But,following error occurs on user screen:EGAVGA.BGI file not found by Graphics driver
Can anyone give me solution?
I think it depend upon the compiler you use.If you have using codeblocks then at first make sure that you have setup winBGI graphics library .If not then follow this link http://codeincodeblock.blogspot.com/2011/09/how-to-setup-winbgim-library-in.html

and alternative is to use the current version of Code::Blocks EDU-Portable (Codeblocks-EP) from http://codeblocks.codecutter.net .It has templates for WinBGIm projects installed and all the necessary libraries pre-installed. In Codeblocks-EP just start [File]->[New]->[Project]->[WinBGIm Project]. You'll be able to choose a graphics-only project type, or one with an extra console for standard input/output if you wish.
I think he must be using an older compiler that supports it, as the error message happens when InitGraph() cannot find the device driver.

In order for the BGI graphics to work, one of the graphics driver files must be loaded. Make sure you put a copy of the EGAVGA.BGI file in the same directory as your program's executable.

Hope this helps.
It really worked,Duoas. Thank u very much!
Don't forget to mark as answer
Topic archived. No new replies allowed.