How do I Add Graphics in Dev C++? 5 Easy Steps

Add Graphics in Dev C++?

Dev C++ requires graphics.h header file to enable graphics on computers. Graphics is outdated, and as it was 20+ years back. Modern computers that run 64-bit don’t support it anymore.

In the MS-DOS period, it was a popular library and used by various applications. Even those who are a novice in graphics could gain knowledge from the graphics.h library. It also provides the basis of modern graphics.

There are more complicated but more efficient libraries available than graphics.h. Just to name a few

  • OpenGL
  • DirectX
  • SDL
  • SFML
  • Allegro

If you’re having trouble creating graphic elements in development C++, this tutorial will detail How do I Add Graphics in Dev C++?

Also Read: How To View and Manage Hulu Watch History | Easy Tutorial

How do I Add Graphics in Dev C++ (Follow These Steps)

Add Graphics in Dev C++?
  • Download/update the most current version of development C+
  • Insert the header source files to Dev Cthe ++ directory
  • Switch the compiler’s suitability for Dev C+.
  • Set up the required linkers for graphics
  • Check whether the graphics.h header is in operation (optional)

Step 1: Download/update most recent version of C++ dev C+

It’s recommended to download the most recent version Dev C++ application. With the latest version, you will likely get more features and fewer bugs and security patches.

You can download the most recent version of development C++. I’m running version 5.11 for this post. You may receive an upgrade, but the process stays the same. You can verify your Dev Cversion by clicking “help” on the menu on top and then clicking ” About Dev C+.”

Also Read: 9 Best Ways to fix WhatsApp not working on WiFi 

Step 2: Upload header source files to the Dev C directory

Add Graphics in Dev C++?

Then, you must download the graphics library files and upload them to the correct folders within the “MinGW64” directory. Follow this procedure –

  1. Download the header files using the Google download URL and extract the header files.
  2. It contains three files: graphics.h, winbgim.h and libbgi.a.
  3. It is necessary to duplicate “graphics.h” and “winbgim.h” into the included directory for Dev-Cpp Resource files for the program. The exact address of the directory is the following:
  • C:\Program Files (x86)\Dev-Cpp\MinGW64\include
  1. Then, Copy “libbgi. a” to Libre. The folder should be within the MinGW64. The directory address is —
  • C:\Program Files (x86)\Dev-Cpp\MinGW64\lib

Check the Include and check the Include and folders for these files before proceeding to the next step.

Also Read: Intel Dinar Chronicles: Latest News and rumours About Dinars

Step 3: Reset your compiler to match Dev C+.

Compiler packages combine the most current stable version of the GCC toolset with the MinGW’s runtime APIs that are open source to create an open-source substitute for Microsoft’s compiler. It is essential to adjust the TDM — GCC Version to the 4.9.2 32-bit version.

  1. The first time you open the Dev C++ application.
  2. To the right of the toolbar, you’ll be able to use the drop-down menus to choose the compiler you want.
  3. Make it TDM- GCC 4.9.2 32 bit release.

Step 4: Set up the required linkers to graphics

Add Graphics in Dev C++?

Setting up linkers is an essential procedure, as this program can help connect objects of a program to a single object file. To use graphics.h setup, you’ll require these linkers to be configured to the compiler suite you have selected, also known as TDM or GCC 4.9.2 32 bit release.

Also Read: 9 Free & Best Noise Cancellation Software You Must Try

How to set up graphics.h linkers:

  1. If you’re using Dev C++, look for the Tool option in the top menu.
  2. Extend the tools and choose the Compiler options.
  3. You’ll need to go to the general tab of the compiler options window.
  4. Ensure that the ” Add the following commands when you call”linker” checkbox is checked.
  5. Add these linkers to the input box (just duplicate and copy this text)
  • -libgcc -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
  1. Then click OK to save.

Once you have completed the course, you will be able to implement the graphics.h header in your C or C++ applications.

Step 5: Check if the graphics.h header is functioning (optional)

Create a Source file. Write a script to test the graphics.h header. You can experiment with any feature you like, such as printing GANA (in the Hindi language) with basic graphic output and techniques…

#include #include #include #include main() 

Here’s the output:

Is it still not possible to include graphics in Dev C++?

Eventually, following this guide will ensure that your graphics.h header works in conjunction with its Dev C++ application. If you’ve not followed the procedure thoroughly, you could end up the steps being skipped… and if it’s not working, it’s best to uninstall any earlier versions or versions of Dev C++ and ensure you are running the most recent version. You can follow these steps over and over again.

Chris Evan was born in Dubai and raised in Montreal. He studied Computer Science and was so pleased with computer languages. He began writing after obsessing over technology.

Leave a Reply

Your email address will not be published. Required fields are marked *