Nov 20, 2016

Execute Graphics in Dev CPP

Execute Graphics In Dev CPP D4Techs

How to Execute Graphics in Dev CPP?


Dev CPPCode Block & other software generally not able to execute graphics and its function. This is happen because the software you are using may not have Graphics.h header file in library. To solve this problem, we have to include graphics library into the library directory. This trick works for Turbo C, Dev C++, Code Block and other software also.


Sometimes you have to add some parameters also to run the program fast. To know how to do this, just follow the steps given below :

Steps to Follow :

  1. Install Dev-C++. I installed from the Version 4.9.9.2 Setup File.
  2. Download graphics.h to the include/ sub-directory of the Dev-C++ directories.
  3. Download libbgi.a to the lib/ In order to use the WinBGIm sub-directory of the Dev-C++ directories.
  4. Whenever you #include <graphics.h> in a program, you must instruct the linker to link in certain libraries. The command to do so from Dev-C++ is Alt-P. Choose the Parameters tab from the pop-up window and type the following into the Linker area:
    -lbgi
    -lgdi32
    -lcomdlg32
    -luuid
    -loleaut32
    -lole32

You can now compile and run programs that use the WinBGIm graphics library, such as this one that opens a small window.

Enjoy the hack! share this trick with your friends by sharing buttons given below….

No comments:

Post a Comment

Bulk Rename - Replace _ with space using PowerShell

How to Bulk Rename - Replace _ with space using PowerShell? Execute below command in PowerShell to replace it, Make sure you enter correct p...