You may be wondering how to add graphics.h in dev C++. Dev C++ does not support BGI Graphics we have to include graphics library manually. Here are few steps you must follow before using graphics.h header file.
Mar 28, 2013 You may be wondering how to add graphics.h in dev C. Dev C does not support BGI Graphics we have to include graphics library manually. Here are few steps you. I can do graphics in Dev- C. I am using Dev-C.:). Just follow the instructions carefully and do not forget to put linkers. You can't do a graphics by making a new source file. You need to do a. Jan 23, 2016 WinBGIm (Windows BGI - with mouse) is a port of BGI (Borland Graphics Interface, graphics.h) for modern Microsoft Windows operating systems to let you add and include graphics.h in Dev C.
. Download following files to the directories mentioned:
The newly created directory, called BGI, includes all the files we'll need (including the WinBGIm Libraries and a pre-set project already set up to use them) in order to create a graphics.
Download graphics.h to the include/ subdirectory of the Dev-C directories. Download libbgia. To the lib/ In order to use the WinBGIm subdirectory of the Dev-C directories. Whenever you #include in a program, you must instruct the linker to link in certain libraries. The command to do so from Dev-C.
graphics.h Directory:> C:Dev-Cppinclude libbgi.a Directory:> download to C:Dev-Cpplib) Creating Project:
STEP 1: Open DEV C++ Compiler
STEP 2: Creating New Project
i. Go to File>New>Project as shown in following figure:
ii. Create New Project 'DialogBox' will appear select 'empty project' and name your project in the space provided. Select Language C or C++ according to your need. Press Ok and select the location where you want to save.
STEP 4: Set linker parameters
Navigate to 'Project' menu and choose 'Project Options'. A dialogbox will appear than select 'Parameters' option and type following in 'Linker' field. -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
Press OK, you are now able to use graphics.h functions in your code.
STEP 5: Testing sample Program
In new versions of dev c++ compiler automatically adds one source file to project. If there is no any existing source file simply add new file By chossing new file option from file menu. Type the following code and save the file. I saved file as 'main.cpp' its your chooice whatever you name it.
STEP 6: Compiling and Runing the program
Http://cs.colorado.edu/~main/bgi/dev-c++
If you have followed all the steps carefully after compiling and runing the program your output should be somthing like this:
STEP 7: Find more functions
Www.cs.colorado.edu Main Bgi Dev-c++
Follow these links for more functions of graphics.h