Skip to content

Commit 58f8d8e

Browse files
committed
update comments in sdl-game-gui.cpp to include compilation instructions and requirements for SDL2 and SDL2_ttf
1 parent 7009750 commit 58f8d8e

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

sdl-game-gui.cpp

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
// https://claude.ai/chat/c9101bf5-9807-4f12-be2b-b2d186596edc
2-
// g++ -o sdl-game-gui sdl-game-gui.cpp -lSDL2 -lSDL2_ttf && ./sdl-game-gui
32

3+
// SDL2 Game GUI with buttons and text rendering
4+
5+
// Requirements : compilation requires SDL2 and SDL2_ttf development libraries .
6+
7+
// On Windows with MSYS2 + MinGW64: pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_ttf --needed
8+
// On Debian/Ubuntu: sudo apt install libsdl2-dev libsdl2-ttf-dev
9+
// On Fedora: sudo dnf install SDL2-devel SDL2_ttf-devel
10+
// On Arch Linux: sudo pacman -S sdl2 sdl2_ttf
11+
// On macOS: brew install sdl2 sdl2_ttf
12+
13+
// This C++ code compiles with GNU g++ and requires the SDL2 and SDL2_ttf libraries :
14+
// g++ -o sdl-game-gui sdl-game-gui.cpp $(pkg-config --cflags --libs SDL2_ttf)
15+
16+
// Tested on GNU g++ :
17+
// g++ compiles in Debian 12 GNU / Linux .
18+
// g++ compiles in Windows 11 using MSYS2 + MinGW64 .
19+
// Not tested yet on Ubuntu, Fedora, Arch Linux, macOS, but should work quite similarly .
20+
21+
// The code is a simple SDL2 game GUI with buttons and text rendering.
422
#include <SDL2/SDL.h>
523
#include <SDL2/SDL_ttf.h>
624
#include <iostream>

0 commit comments

Comments
 (0)