Getting Started
Where to Run graphics.h
There are multiple ways to run graphics.h programs today. Some are easier for students, while others are more traditional or setup-heavy. This guide explains each path clearly so you can pick the right one.
Option 1: Online Compiler Recommended
The easiest way to run graphics.h programs is the online compiler available on this website.
- No installation required.
- Works directly in your browser.
- Designed specifically for graphics.h.
- Suitable for academic assignments.
- Fast and beginner-friendly.
This is the best option for most students because it avoids DOSBox setup issues, driver errors, and compatibility problems.
Access it at: /compiler
Option 2: VS Code Extension (Windows and Ubuntu)
You can also run graphics.h programs using the VS Code extension for a local workflow.
- Works on Windows and Ubuntu.
- Supports Turbo C environment.
- Supports MinGW environment.
- Modern editor experience.
- Easier debugging and file management.
On Ubuntu, the extension can use an installation script to configure the environment:
curl -fsSL https://raw.githubusercontent.com/AlbatrossC/graphics.h-online-compiler/main/compiler-assets/Installers/ubuntu_install.sh | bash
This sets up required dependencies so graphics.h programs run properly on Ubuntu.
Direct installer link: Open ubuntu_install.sh
Note: A more streamlined installation script and setup flow is currently in progress.
Option 3: Turbo C with DOSBox (Traditional Method)
This is the traditional way graphics.h was originally used.
Typical steps:
- Install DOSBox.
- Install Turbo C.
- Configure the BGI directory.
- Compile and run in the Turbo C IDE.
It is still used in many institutions, but it is outdated, requires manual setup, and runs in a 16-bit DOS environment.
Option 4: Ubuntu Manual Setup
If you prefer manual configuration on Ubuntu, this community thread is useful:
https://askubuntu.com/questions/525051/how-do-i-use-graphics-h-in-ubuntu
It explains multiple approaches for getting graphics.h support on Ubuntu.
Note: A simplified Ubuntu installer is under development to reduce manual steps.
Option 5: Dev C++ and Code::Blocks
Some students use graphics.h with Dev C++ or Code::Blocks.
This usually requires:
- Installing a compatible BGI implementation.
- Configuring include and library paths correctly.
- Using MinGW with additional compatibility layers.
Setup steps vary by OS and version. Useful search keywords:
graphics.h Dev C++ setupgraphics.h Code::Blocks configurationgraphics.h MinGW tutorial
Many practical, step-by-step video guides are available on YouTube.
Important Notes
- graphics.h is not part of standard C.
- It is primarily used in academic syllabi.
- Modern professional C/C++ development does not use graphics.h.
- For real projects, prefer SDL, SFML, OpenGL, or Qt.
Frequently Asked Questions
What is the easiest way to run graphics.h right now?
Use the online compiler. It avoids local installation and is the most student-friendly path.
Is graphics.h part of standard C?
No. graphics.h is not part of standard C and is mostly used for academic coursework and legacy environments.
Which libraries should I learn for modern graphics development?
For modern work, start with SDL or SFML, then explore OpenGL, GLFW, or Qt depending on your goals.