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

Author Topic: Cross-Compiling for Windows  (Read 2486 times)

0 Members and 1 Guest are viewing this topic.

Kashlavor

  • Newbie
  • *
  • Posts: 4
    • View Profile
Cross-Compiling for Windows
« on: September 01, 2013, 11:10:03 am »
I'm working on a project using Fedora linux and Code::Blocks, I was hoping that someone could point me in the right direction for how I would be able to compile an exe for windows (I'm using the static libraries right now).

Ideally I'd like to be able to develop on my laptop, and then compile for various build targets, email/dropbox them over to everyone else (who mostly uses windows) in order to have some rapid playtesting and iteration.  Any help would be appreciated.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Cross-Compiling for Windows
« Reply #1 on: September 01, 2013, 11:43:53 am »
As far as I know true cross-compilation doesn't really exist in general so you're probably going to have to get Windows in some form if you want to compile for Windows.  The good news is that a VM is more than enough if all you want to do is compile on it.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Cross-Compiling for Windows
« Reply #2 on: September 01, 2013, 11:46:45 am »
http://www.virtualbox.org/ or http://qemu.org/
Easiest way... by far... really far...
If you need to resort to asking on this forum about cross-compilation I would also recommend not trying to do it the hard way...
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Cross-Compiling for Windows
« Reply #3 on: September 01, 2013, 11:48:33 am »
I'm not experienced in cross compilation, but from what I've read and seeing the difficulties one can encounter already on native Windows, I'd say, you'd be wasting more time to get something to cross conpile, rather than using a VM to do so.

In any case MinGW has such cross compilagion features, but don't ask me anything about its use. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kashlavor

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Cross-Compiling for Windows
« Reply #4 on: September 02, 2013, 04:06:50 am »
So best way would be to get SFML and Code::Blocks set up on a windows machine and then share the source, then compile on that?

Thanks for the advice so far.

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Cross-Compiling for Windows
« Reply #5 on: September 02, 2013, 04:18:48 am »
Yes.

mattr

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Cross-Compiling for Windows
« Reply #6 on: September 02, 2013, 07:24:26 pm »
So best way would be to get SFML and Code::Blocks set up on a windows machine and then share the source, then compile on that?

Thanks for the advice so far.

Yeah if you have cmake and a git repo, it can be as simple as cloning it and running cmake to get a new makefile.