Libbgi A Download For Dev C%2b%2b

Libbgi.a (download to C: Dev-Cpp lib) After you have downloaded the files to the correct locations, you can now use WinBGIm’s graphic.h as you would Borland’s graphics.h with a few caveats. Using library files: First, you have to tell Dev-C where to find the library functions that WinBGIm references–this is done in the “Project. Download required libraries from here. It is a tradition to use Turbo C for graphic in C/CPP. But it's also a pain in the neck. Here we are using Code::Blocks IDE, which will ease out our work. Embarcadero Dev-C is a new and improved fork (sponsored by Embarcadero) of Bloodshed Dev-C and Orwell Dev-C.It is a full-featured Integrated Development Environment (IDE) and code editor for the C/C programming language. How to install WinBGIm Graphics Library in Dev C 5.11Download link:http://www.mediafire.com/download/rbds52w6a34vf65/GraphicsinDevC.rar.

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. .
Download following files to the directories mentioned:
graphics.h Directory:> C:Dev-Cppinclude

Libbgi A Download For Dev C 2b 2b 2


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.

Libbgi A Download For Dev C 2b 2b 4


  • 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
Libbgi a download for dev c 2b 2b 4 -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.

Libbgi a download for dev c 2b 2b 4
  • STEP 6: Compiling and Runing the program
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
Follow these links for more functions of graphics.h
1. http://www.programmingsimplified.com/c/graphics.h
2. http://www.cs.colorado.edu/~main/bgi/doc/initgraph.html
3. http://www.cs.colorado.edu/~main/bgi/doc/
You can comment here if you have any trouble.

Introduction
So far we have been using C language for simple console output only. Most of us are unaware that using C++, low level graphics program can also be made. This means we can incorporate shapes,colors and designer fonts in our program. This article deals with the steps to enable the DevC++ compiler to generate graphics .
Configuring DevC++

Download
  • Step 1: Download the DevC++ version 5.11 from here.
  • Step 2: Download the Graphics header files, and etc stuff needed from the given dropbox link.
  • Step 3: Extract the contents of the rar file.
  • Step 4: Go to the location where DevC++ is installed. For me its D drive. Go inside the MinGW64 folder. Copy the graphics.h and winbgim.h in the include folder and D:Dev-CppMinGW64x86_64-w64-mingw32include folder.
  • Step 5:Copy the libbgi.a file into lib folder and in D:Dev-CppMinGW64x86_64-w64-mingw32lib folder.
  • Step 6: Copy the ConsoleAppGraphics.template, ConsoleApp_cpp_graph.txt files and paste them inside the template folder of the devc++ installer location.

Now we are done with configuring of the DevC++ to support graphics programming. We shall write our very first graphics program now.
Running the first graphics program

  1. Open DevC++. Click file ->New ->Project.
  2. Make sure you get the Console Graphics option. However, we are not going to click on it.
  3. Choose Empty Project option and Give a project name and make sure the selected language is C++.
  4. Copy the following code to the editor window.
  5. Go to “Project” menu and choose “Project Options” (or just press ALT+P).
  6. Go to the “Parameters” tab In the “Linker” field, enter the following text:
    -lbgi
    -lgdi32
    -lcomdlg32
    -luuid
    -loleaut32
    -lole32
  7. Click OK and Compile and run the project and you’ll get this output:

Program Explanation

  • The initgraph function- ?Initializes the graphics system.
  • In C Program execution starts with main() similarly Graphics Environment Starts with this function.
  • initgraph() initializes the graphics system by loading a graphics driver from disk (or validating a registered driver) then putting the system into graphics mode

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above