A GUI-based calculator developed in C using GTK.
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.
Before compiling, ensure the following packages are installed:
gcc
β C compilerpkg-config
β Compiler and linker configuration helperlibgtk-3-dev
β GTK+ 3 development filesSee the Requirements Guide for full details and installation commands for all platforms.
git clone https://github.com/rafisarkar0128/c-gui-calculator.git
cd c-gui-calculator
sudo apt update
sudo apt install gcc pkg-config libgtk-3-dev
sudo dnf install gcc pkgconf-pkg-config gtk3-devel
brew install gcc pkg-config gtk+3
β οΈ Additional setup like XQuartz may be required to run GUI apps on macOS.
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.
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.
pkg-config
reports missing paths, verify GTK installation.mingw-w64
environment, not the default msys
.