SFML community forums

Help => General => Topic started by: Xrey274 on February 24, 2019, 11:13:41 pm

Title: Compiling for Windows
Post by: Xrey274 on February 24, 2019, 11:13:41 pm
Currently using Linux(Solus) and Code::Blocks to develop my program and I want to know how to compile it for Windows. It tried renaming the executable .exe(dumb idea I know) and an error popped up on Windows "This app can't run on your pc". So could you please tell me how to do it?
Title: Re: Compiling for Windows
Post by: eXpl0it3r on February 24, 2019, 11:17:10 pm
The same way you got a binary for Linux in the first place. Install a compiler (and IDE if you want) and build the source code for Windows. ;)
Title: Re: Compiling for Windows
Post by: Xrey274 on February 25, 2019, 12:23:02 am
So I downloaded the GCC 7.3.0 MinGW (SEH) - 64-bit version of sfml linked it up with Code::Blocks(using gcc compiler) and got this error:
 /usr/bin/ld: /home/xrey274/Desktop/SFML-2.5.1Windows/SFML-2.5.1/lib/libsfml-graphics.a: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status
Title: Re: Compiling for Windows
Post by: eXpl0it3r on February 25, 2019, 07:35:21 am
You of course need to run this on Windows. (I wouldn't recommend cross-compilation)