Monday, August 11, 2014

Configuring Graphics in DEV C++

Configuring Graphics in DEV C++
How to use Borland Graphics Interface (graphics.h) in Dev C++?
  1. Place the following files in given locations
    graphics.h
    ( C:\Dev-Cpp\include)
    libbgi.a
    (C:\Dev-Cpp\lib)
  2. 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 Options" dialog box.
    Here are instructions on how to do this with a new project:


  1. Create a new project. 
  • Go to the "File" menu and select "New", "Project".
  • Choose "Empty Project" and make sure "C++ project" is selected.
  • Give the project name eg. myproj
  • Click "OK".
  • Dev-C++ will now ask you where to save your project. Save it.
  1. Create/add source file(s). 


  • Go to the "Project" menu and select "New File".
  • Go to "Project" menu and choose "Project Options" (or just press ALT+P).
  • Go to the "Parameters"  tab
  • In the "Linker" field, enter the following text:-lbgi
    -lgdi32
    -lcomdlg32
    -luuid
    -loleaut32
    -lole32
Project Options -> Parameters:
  • Click "OK".
  • Write your graphics program in the source file created.
  • Compile using menu “Execute” “Compile”
  • Run the program “Execute” “Run”
If program is error free, then the graphics will be run.





HackerBoy

Compiled By Sabin Khanal

0 comments:

Post a Comment

 

Copyright @ 2013 Learn Programming.

Designed by Templateiy & CollegeTalks