Sign in to follow this  

Cross Compiling, building on Windows for Linux

This topic is 4861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm in the middle of writing a game in Dev-C++ and SDL (Ogre3D for another project), everything is coming along nicely, compiles fine, runs nicely, it doesn't contain "windows specific" code or headers, and I have the SDL development library for Linux, if I were to compile it on Linux, I'd use Mandrake 10.0, I have 9.3 on CDs but I'd rather 10.0 but I haven't downloaded it yet, and I dont have enough hard drive space left to install Linux anyway, so without installing Linux, how would I compile this project *for* Linux, from Windows, ie: building on Windows for Linux, are there any tools?

Share this post


Link to post
Share on other sites
Cygwin is probably what you want, but as an alternative, you could boot on a Knoppix CD and compile it there. I think a possible problem is that you would probably have to re-install the SDL packages everytime you booted. Not a great long-term solution, but something to consider at least.

Share this post


Link to post
Share on other sites
Okay, i've gone to the site, and reading about what it is, it is not what I want, let me clarify this really cleary:

I have a program I wrote in Dev-C++ with the SDL library, it compiled to a Windows Executable with MingW (a windows of port of GCC, which is what Cygwin seems to be), I want to compile it again on Windows, but this time output a Linux executable file, and I want to run that compiled program on Linux *NOT* on Windows.

Share this post


Link to post
Share on other sites
Just to clarify, cygwin is much more than a "windows port of GCC". To put it simply, cygwin provides a complete emulated linux environment able to run under windows without a dual-boot type setup. If your program can compile and execute under cygwin then it can compile and execute under Linux.

As far as producing an actual Linux executable, I do not believe cygwin has that functionality by default. If you want that functionality then I see no reason why you could not simply grab the source to GCC, compile it under Cygwin and then finally use that program to produce linux executables under Cygwin under Windows.

Share this post


Link to post
Share on other sites

This topic is 4861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this