filmov
tv
Make a GUI Calculator in C like a real Chad
Показать описание
I'm gonna show you how to make a small & aesthetic calculator app in C
like a real chad. No QT, GTK or any other bloat required.
NOTE: If you're on arch, you can easily build leif (the UI library) from the aur: paru -S libleif.
Build cglm from source: https://
FOR DEBIAN:
Debian users and derivatives (Ubuntu, Mint, etc.) you will have to use the standard way of building and installing libraries.
First of all, make sure you have your distro version updated with sudo apt update && upgrade
Also, for glfw you will need the libwayland-dev and libxkbcommon-dev packages to compile for Wayland and the xorg-dev meta-package to compile for X11. These will pull in all other dependencies so make sure to type in the terminal the following command: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev.
Get the github repo links for cglm, libclipboard and glfw. (I'll get to the roboto-mono part later in the comment)
Clone each of them in your /home/your_username path preferably.
Create a build file for each of them. (build_cglm for cglm, build_glfw for glfw, you get the idea)
type cd to enter each build file and type in the terminal the following command: "cmake -S /home/your_username/the_library_you_want_to_build -B ." (without quotes).
-S is to instruct cmake where the source file is and -B is the path where you want it to be built. The dot at the end there is to instruct the terminal that you want to use the file path you're currently in as your destination to build, example: cmake -S /home/benj/libclipboard -B .
Then you will type make, wait for the terminal to tell you it is built, then type sudo apt install to install it in the default paths for you to use it (default paths are usr/local, usr/include and usr/lib)
debian tutorial by benj
like a real chad. No QT, GTK or any other bloat required.
NOTE: If you're on arch, you can easily build leif (the UI library) from the aur: paru -S libleif.
Build cglm from source: https://
FOR DEBIAN:
Debian users and derivatives (Ubuntu, Mint, etc.) you will have to use the standard way of building and installing libraries.
First of all, make sure you have your distro version updated with sudo apt update && upgrade
Also, for glfw you will need the libwayland-dev and libxkbcommon-dev packages to compile for Wayland and the xorg-dev meta-package to compile for X11. These will pull in all other dependencies so make sure to type in the terminal the following command: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev.
Get the github repo links for cglm, libclipboard and glfw. (I'll get to the roboto-mono part later in the comment)
Clone each of them in your /home/your_username path preferably.
Create a build file for each of them. (build_cglm for cglm, build_glfw for glfw, you get the idea)
type cd to enter each build file and type in the terminal the following command: "cmake -S /home/your_username/the_library_you_want_to_build -B ." (without quotes).
-S is to instruct cmake where the source file is and -B is the path where you want it to be built. The dot at the end there is to instruct the terminal that you want to use the file path you're currently in as your destination to build, example: cmake -S /home/benj/libclipboard -B .
Then you will type make, wait for the terminal to tell you it is built, then type sudo apt install to install it in the default paths for you to use it (default paths are usr/local, usr/include and usr/lib)
debian tutorial by benj
Комментарии