just me learning basic c I just want to learn the basics and make a few small programs (most of my code is private this is not all I made in C)
If you want to try running some of the very simple programs I made you will need to have GTK installed on your system since I made a program to make a simple window with a few buttons to play around with it
Here are the instructions to install GCC & GTK on Linux, MacOs and Windows:
-
Update your package list:
sudo apt update
-
Install GCC:
sudo apt install build-essential
This will install GCC along with other essential development tools.
-
Verify GCC installation:
gcc --version
This will display the installed version of GCC. If it says "unknown command" you will have to try installing it another way
-
Install GTK development libraries: To install GTK 3 (the most commonly used version and the only one we need here):
sudo apt install libgtk-3-dev
-
Verify GTK installation (for GTK 3):
pkg-config --cflags --libs gtk+-3.0
-
Update your package database:
sudo pacman -Syu
-
Install GCC:
sudo pacman -S base-devel
The
base-devel
package group includes GCC and other essential tools for development. -
Verify GCC installation:
gcc --version
-
Install GTK 3 (most commonly used):
sudo pacman -S gtk3
-
Verify GTK installation: For GTK 3, you can check the installation with:
pkg-config --cflags --libs gtk+-3.0
After Installation:
Once installed, you can compile programs that use GTK with GCC. Here’s an example:
gcc `pkg-config --cflags gtk+-3.0` my_program.c -o my_program `pkg-config --libs gtk+-3.0`
This will compile my_program.c
using the GTK 3 libraries.
dm my discord (im.awsum) if you run into issues
-
Install Xcode Command Line Tools:
xcode-select --install
-
Verify GCC installation:
gcc --version
-
Install Homebrew (if you don't have it installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install GTK using Homebrew: For GTK 3:
brew install gtk+3
-
Verify GTK installation:
pkg-config --cflags --libs gtk+-3.0
sigh
Not only is your operating system closed-source but it's also bloated, filled with a bunch of ads, has a ton of included spyware and it's not even free. I won't type a single line of code for this operating system. With all the time it took to scroll down this page it probably took away one of your victory royale... I guess your bloated operating system supports Fortnite... You should go back to playing that instead of trying to run code made for the superior Unix like operating systems.
Windows bad.