distribute SFML game made on linux to any

So i made a simple game in SFML on linux and now i want to make able to run in Win .

info :
- Ubuntu
- SFML installed under default path (command obtain in SFML website )
- a font is used by the game ( has to be embedded)
- compilation and execution commands as follows :
javascript:tx('code'){
g++ -c game.cpp
g++ game.o -o run -lsmfl-graphics -lsmfl-window -llsmfl-system
./run
};
runs perfectly in linux.

how do i get it to work as .exe in windows ? what is the linking here ' i guess static, since there are not .DLL in the folder)
Last edited on
Yes, it should be static.
Which compiler do you have there, MSVC or GCC? I consider to use MinGW/G++ with the same command, but instead of "run" there, rather use a *.exe output file.
Install cygwin

Compile it as you would in linux, but from within the cygwin shell instead.

Make sure the cygwin dll is in the same directory as your exe file if you distribute it.

Try it, see what happens. I'm curious if the exe and the dll are all thats needed on a bald Windows for any given program made by gcc...
and a month later i am sad to say that i gave up
You did recompile it on windows, yes?
i couldn't do so because somehow SFML refuse to be installed with codeblocks. something is happening and it's beyond my knowledge.
Topic archived. No new replies allowed.