Sunday, October 14, 2012

Installing Graphics.h in Windows

Follow these steps to install and use graphics.h in windows :
  1. First install CodeBlocks
  2. Then download WinBGIm and extract it.
  3. Copy and paste graphics.h and winbgim.h files to include folder of your compiler directory.
    Mine was C:\Program Files (x86)\CodeBlocks\MinGW\include
  4. Copy and paste libbgi.a to lib folder of your compiler directory.
    Mine was C:\Program Files (x86)\CodeBlocks\MinGW\lib
  5. In code::blocks open Settings >> Compiler and debugger >>linker settings
  6. click Add button  in link libraries part and browse and select libbgi.a file
  7. In right part (ie. other linker options) paste commands
  8. -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
  9. click Ok
The file should be .cpp.
This version of graphics.h is the modified error free one.

Download the graphics.h file from this link :
http://www.mediafire.com/?nd3whqoqb36h8ou

2 comments:

  1. Do I need to select console program or glut program . To run that code using graphics.h ?

    ReplyDelete
  2. Select CONSOLE application in C++ language...

    ReplyDelete