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

Author Topic: Best way to cross-compile my game from linux?  (Read 3040 times)

0 Members and 1 Guest are viewing this topic.

thenonameguy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Best way to cross-compile my game from linux?
« on: December 18, 2012, 07:52:42 pm »
Hey guys, I finished a small game yesterday, and I'm trying hard to build an .exe file for my windows using friends with mingw32. Sadly, I'm not great at this makefile/compiling thing, and since I haven't found a post like this on the forums with a solution, my question is:

How do YOU cross-compile your SFML applications from linux?

Thanks in advance!  :)

flow10000

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Project Abyss
Re: Best way to cross-compile my game from linux?
« Reply #1 on: December 18, 2012, 10:27:05 pm »
I ask the same question from windows (visual studio) to linux :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Best way to cross-compile my game from linux?
« Reply #2 on: December 18, 2012, 10:42:52 pm »
From Windows to Linux, the best way is to install a virtual machine. Or even a native Linux on another partition. A native build is always simpler and better than using a cross-toolchain.

I'd say to do the same for Windows, but since you have to pay for it... ;)

I've never used it, but from what I heard mingw32 is the easiest way to cross-compile applications for Windows. So all you need is more tutorials and more practice :P
Laurent Gomila - SFML developer

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Best way to cross-compile my game from linux?
« Reply #3 on: December 18, 2012, 11:02:45 pm »
Dual booting with linux is great. Linux is free, fast and terminal and everything is so so so comfy.
Back to C++ gamedev with SFML in May 2023

thenonameguy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Best way to cross-compile my game from linux?
« Reply #4 on: December 19, 2012, 07:56:42 am »
From Windows to Linux, the best way is to install a virtual machine. Or even a native Linux on another partition. A native build is always simpler and better than using a cross-toolchain.

I'd say to do the same for Windows, but since you have to pay for it... ;)

I've never used it, but from what I heard mingw32 is the easiest way to cross-compile applications for Windows. So all you need is more tutorials and more practice :P
Then I will learn more, and post a generic-like makefile here if I succeed.
Ps: Thanks for creating this awesome library! :)

thenonameguy

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Best way to cross-compile my game from linux?
« Reply #5 on: December 22, 2012, 08:12:09 pm »
The only solution that worked for me:
  • Install virtualbox and windows xp
  • Recompile SFML with your compiler of choice (MinGW for me)
  • Download Code::Blocks use tutorials on the site and compile your game with dynamic libraries

8 hours but it was worth the time! :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10825
    • View Profile
    • development blog
    • Email
Re: Best way to cross-compile my game from linux?
« Reply #6 on: December 22, 2012, 08:17:21 pm »
8 hours but it was worth the time! :)
Well that's nothing compared to what you would've needed without a crossplatform library and some bug hunting that are done even from more or less professionals. ;D

VirtualBox is a nice way to go, but for all the readers that could misunderstood you, Windows XP is not the only Windows that can get installed in the VirtualBox. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything