Thread: Compiling for other OSs on a Windows machine

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912

    Compiling for other OSs on a Windows machine

    I've downloaded Cygwin, and I'm quite impressed. I noticed that when I was selecting the packages to install, it had a set of compilers I could use. Will these compilers take my source code and compile it to a Linux-executable even though it is on a Windows machine? And I know there are sometimes cases where something will run on one version of Linux, but not another. This program will be in C using the SDL library (although not officially ported to Linux yet), and I won't be using any platform-specific APIs - will this still have problems on some Linux machines? I'd also like to know if there are similar compilers that can compile for Solaris or BSD, also while running on a Windows system.

  2. #2
    ---
    Join Date
    May 2004
    Posts
    1,379
    it certainly will
    they will only run inside thw cygwin layer or on a similar linux machine.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    By similar do you mean on a Red Hat system?

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    no. if you compile with cygwin you will be generating exe's. If the code is compiled for linux (using a cross-compiler) it can only be executed on that platform (ex, linux binaries dont run on BSD, or SUN). however, if the code is not using platform specific api's, you should be able to compile it on any of these platforms. (ie. distribute the source not the binary, most of us in the linux world prefer it that way )

  5. #5
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536
    Let me make sure I follow this... you mean the binary can be run on a native linux machine right... or do you mean it can only be run on another Cygwin install?

    With Penguin-Does you can run and compile native linux binaries (assuming you install GCC, or some other compiler).

    I haven't checked the download in some time... but just to "warn" you it comes with eAcceleration (not necessarily a bad thing, but some people may not appreciate it. In the future this bundling will change)

  6. #6
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Now GCC is a UNIX compiler - how can I get it an istall it for use with Penguin-Does?

  7. #7
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536
    Penguin-Does is based off of Debian. You can use apt-get to install it or just grab a debian package

    If I remember right the command for apt-get is "apt-get install gcc"

  8. #8
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Well this eAcceleration this is ........ing me off. I've got spyware all over my computer now. Debian it is.

    edit: I looked at their website and it looks like a full-out OS. Is it not just an emulator?
    Last edited by sean; 07-24-2004 at 08:56 PM.

  9. #9
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536
    Quote Originally Posted by sean_mackrory
    edit: I looked at their website and it looks like a full-out OS. Is it not just an emulator?
    Well, it's not a full-out OS or an emulator... I guess I really don't know how exactly to explain it. It runs unmodified linux binaries, some version of Debian (not sure which)... but on Windows. I suppose maybe it could be classified as an emulator? What is Cygwin considered?

    Or are you talking about Debian? Debian itself is a full out OS. Penguin-Does is simply built around Debian packages.

    Sorry about the eAcceleration stuff. Like I said, sometime in the future it should be quite different... (FYI, yes, I work for eAcceleration. The Penguin-Does website is *old* and uses *old* stuff. Our *new* stuff is WAYYYYYY different then what you get from the Penguin-Does site. No more bundling, only download and install what *you* want!) For what it's worth all of the other eAccelertion stuff can be totally uninstalled without ruining Penguin-Does. It comes with an MSI installer which gets extracted to the install directory. If I remember correctly this is either %program files%\eAcceleration\Penguin-Does or %program files%\Acceleration Software\Penguin-Does. Just copy that MSI elsewhere, uninstall everything using Windows add/remove programs, and reinstall Penguin-Does... I hate having to give instructions like this, but I think Penguin-Does is the best app of it's type out there.
    Last edited by TravisS; 07-24-2004 at 09:31 PM.

  10. #10
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    I'm not doing anything more with eAcceleration products. Only now am I managing to keep up with what it's done to my PC. From what you said - Debian is an emulator. Cygwin I'm not sure... It doesn't sound enough like Linux to be considered an emulator. It's more a simulator in my opinion.

  11. #11
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by sean_mackrory
    ... From what you said - Debian is an emulator. Cygwin I'm not sure... It doesn't sound enough like Linux to be considered an emulator. It's more a simulator in my opinion.
    Debian is a linux distro, not an emulator. Your description of Cygwin is quite good. it simulates a linux/unix environment.

  12. #12
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    So Debian WOULDN'T run on windows?

  13. #13
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536
    Quote Originally Posted by sean_mackrory
    So Debian WOULDN'T run on windows?
    No, it won't. What I was trying to say was Penguin-Does is based on Debian. Debian is a Linux distrobution. Penguin-Does allows you to run Debian on Windows. K?

    I also think your description of Cygwin is fair.. it's more of a simulator. That's where the two products differ quire a bit. Cygwin is *not* Linux. It will *not* run compiled Linux binaries. Penguin-Does on the other hand, will

  14. #14
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    So Penguin-Does (and I just realized the play on words in the name) is basically an x-86 emulator?

    edit: Speaking of x-86 emulators, Bochs (http://bochs.sourceforge.net) looks like exactly what I want. Thanks guys!
    Last edited by sean; 07-25-2004 at 09:04 AM.

  15. #15
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536
    Quote Originally Posted by sean_mackrory
    So Penguin-Does (and I just realized the play on words in the name) is basically an x-86 emulator?

    edit: Speaking of x-86 emulators, Bochs (http://bochs.sourceforge.net) looks like exactly what I want. Thanks guys!
    Yeah... we were going to name it Penguindows until the boys at Microsoft had their pick at it [edit] Almost missed half the question. Honestly I have no idea if it's an x-86 emulator or not... I suppose that would make sense though.


    Thanks for the link to Bochs, looks interesting! I'll have to check it out.
    Last edited by TravisS; 07-25-2004 at 07:58 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 09-22-2008, 04:49 AM
  2. Compiling in Windows (Supreme infernal task)
    By NeMewSys in forum C++ Programming
    Replies: 11
    Last Post: 05-22-2008, 03:41 PM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  4. Microsoft software on a windows machine...
    By Syngyl in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-06-2002, 05:44 PM
  5. Problem with Borland 5.5 Compiling Windows Programs
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 08-28-2001, 09:04 AM