I know that these are required to compile a C++ app but what I don't know is how do I build my app so that other users won't need them. I tried to use -static flags to build but it still won't work when I remove mingw\bin\ and msys2\usr\bin\ from my path or when my friends who don't have a C++ compiler try to run it. For the record, I did include every library for the project when I asked for friends to run it.
Here's my Makefile :
rtx.exe: base.o objects.o rtx.o
g++ -O3 base.o objects.o rtx.o -o rtx -pthread -Lsrc\lib -lsfml-graphics -lsfml-window -lsfml-system -ljsoncpp -static -static-libgcc -static-libstdc++
rtx.o: rtx.cpp
g++ -Isrc\include -O3 -c rtx.cpp -static -static-libgcc -static-libstdc++
objects.o: objects.cpp objects.hpp
g++ -Isrc\include -O3 -c objects.cpp -static -static-libgcc -static-libstdc++
base.o: base.cpp base.hpp
g++ -Isrc\include -O3 -c base.cpp -static -static-libgcc -static-libstdc++
clean:
-rm *.o $(objects) rtx.exe
And here's one of the pop-op I (and my friends withour a C++ compiler) get :
There are 4 pop-ups, 2 of them being this one and the other says the same thing for libstdc++-6.dll.
I tried a bunch of things, including compiling objects.o and base.o into a library using the ar ru
command but it gives the same pop-ups.
My guess is that one of the libraries I'm using, either jsonCpp or SFML is not built statically, but I couldn't find anything about how to fix it.