Simple SFML Setup in directory (MinGW, VS Code)
Why Stack Overflow recommends it
Stack Overflow users link it as the setup tutorial they followed for SFML with MinGW, usually when they hit compile or runtime problems after following it.
Recommended by 0 people across 0 different months, 2021 to 2022.
What it is
A short screencast showing how to set up SFML in a project directory using MinGW and VS Code on Windows, ending with a test program compiled with g++. The presenter, HerbGlitch, notes that Makefiles are optional but reduce typing when compiling and linking.
What people said
Cites Rostcraft · 2021-02 · Stack Overflow · on “How to compile SFML program with shader using g++”
I install SFML from [this video] tutorial. But instead of Make file i created .bat file that execute g++ -Isrc/include -c main.cpp g++ main.o -o main -Lsrc/lib -lsfml-graphics -lsfml-window -lsfml-system
Cites Leroy · 2022-01 · Stack Overflow · on “The window created by sfml crashes even after a successful compilation”
I'm trying to use classes with sfml to have a starting point for a bigger project and I have an issue with my code : it compiles well but when I click the executable, the window closes after ~1s of white. I'll add that I am a beginner in C++ and there is a lot of things about pointer and arrays that I only barely understand thanks to this doc [LINK] . I followed this tutorial [this video] for the environment setup, and the demonstration script works well, I even tried some things to learn to display other shapes and it works perfectly. My modified test is about displaying a 2d array which is an attribute of a class I made. The array is supposed to have its size given in the class constructor's pa
Cites noel puig · 2022-12 · Stack Overflow · on “Trouble compiling sfml with mingW32”
I am trying to install sfml and run it with mingW. This is the first time I use it so I was following a tutorial ( [this video] ). I followed it step by step until the end, where he compiles a test script to check if it works, his does, mine doesn't. I can't figure out why, but it seems to be a problem with the paths because the output says it can't find some files. g++ -Isrc/include -c main.cpp g++ main.o -o main -Lsrc/lib -lsfml-graphics -lsfml-window -lsfml-system C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible src/lib/libsfml-graphics.a when searching for -lsfml-graphicsC:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-ming