Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Compiling for Windows  (Read 1739 times)

0 Members and 1 Guest are viewing this topic.

Xrey274

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Compiling for Windows
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Compiling for Windows
« Reply #1 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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Xrey274

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: Compiling for Windows
« Reply #2 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

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Compiling for Windows
« Reply #3 on: February 25, 2019, 07:35:21 am »
You of course need to run this on Windows. (I wouldn't recommend cross-compilation)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything