C GUI Calculator

A GUI-based calculator developed in C using GTK.


Project maintained by rafisarkar0128 Hosted on GitHub Pages — Theme by mattgraham

πŸ’‘ Getting Started – C GUI Calculator

Welcome! This guide will help you get up and running with the C GUI Calculator built using GTK+ 3. Follow the platform-specific instructions below to clone, install dependencies, compile, and run the calculator.

πŸ“¦ Prerequisites

Before compiling, ensure the following packages are installed:

See the Requirements Guide for full details and installation commands for all platforms.

πŸš€ Setup & Compilation

πŸ”Ή 1. Clone the Repository

git clone https://github.com/rafisarkar0128/c-gui-calculator.git
cd c-gui-calculator

πŸ”Ή 2. Install GTK and Dependencies

πŸ“ Linux (Debian/Ubuntu)

sudo apt update
sudo apt install gcc pkg-config libgtk-3-dev

πŸ“ Fedora/CentOS/RHEL

sudo dnf install gcc pkgconf-pkg-config gtk3-devel

πŸ“ macOS (Homebrew)

brew install gcc pkg-config gtk+3

⚠️ Additional setup like XQuartz may be required to run GUI apps on macOS.

πŸ“ Windows (MSYS2)

pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config mingw-w64-x86_64-gtk3

πŸ’‘ Alternatively, you may use Code::Blocks with proper GTK+ configuration.

πŸ”Ή 3. Compile the Project

gcc -o calculator main.c `pkg-config --cflags --libs gtk+-3.0` -lm
./calculator

🧠 -lm is included for linking math functions if your calculator uses them.

πŸ› οΈ Troubleshooting

πŸ“š Resources