Hi! I wanted to create an app that would use as few files as possible. I know i should use static linking, but i'm not sure how to do so. For the sake of simplicity, i'm using as little of additional software as i can - that means i'm launching the app directly from console.
So far i was using a command like this:
g++ Shader.cpp -Iinclude -Llib -lsfml-graphics -lsfml-window -lsfml-system -lwinmm -lopengl32 -lgdi32 -o Shader.exe
where "include" and "lib" are the folder names, and i use the "Shader.cpp" file from the examples.
However when i try the same setup with a command like this:
g++ Shader.cpp -Iinclude -Llib -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32 -o Shader.exe
it throws a bunch of errors like these:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\<username>\AppData\Local\Temp\ccjZLZ16.o:Shader.cpp:(.text+0x8c): undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
I should also mention i'm using MinGW, and my only expirience with cpp is making cmd applications.