-
Notifications
You must be signed in to change notification settings - Fork 912
Compiling on Linux
Update and install the compiler, related build tools, and libraries required to build PixelGameEngine applications.
sudo apt update
sudo apt install build-essential libglu1-mesa-dev libpng-dev
Update and install the compiler, related build tools, and libraries required to build PixelGameEngine applications.
sudo pacman -Sy
sudo pacman -S gcc glibc libpng mesa
Install development tools, libraries, and C++
sudo dnf groupinstall "Development Tools" "Development Libraries"
sudo dnf install gcc-c++ glew-devel glm-devel libpng-devel
Placeholder for more instructions for more Linux Distributions
g++ -o olcExampleProgram olcExampleProgram.cpp -lX11 -lGL -lpthread -lpng -lstdc++fs -std=c++17
Note for those using extensions and utilities
Certain extensions and utilities use C++20 features. If you use those with PGE, you'll need to compile with -std=c++20
instead.
Earlier versions of GCC
In GCC 7.5.0, and similarly early versions of GCC, you may need to add -DFORCE_EXPERIMENTAL_FS
to your build command to avoid an error involving the missing filesystem header file. While this will get you up and running, it is preferred that you use a more up-to-date version of the GCC compiler system. Upgrade instructions vary between distributions and can be found elsewhere on the internet.
./olcExampleProgram
Your frequently asked questions might appear here, one day!