Find the answer to your Linux question:
Results 1 to 3 of 3
hai "the a.out file will run in windows or not?" pls anyone exlain about that one...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    19

    a.out


    hai
    "the a.out file will run in windows or not?" pls anyone exlain about that one

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    You can run a Linux-compiled executable under windows by using one of many compatibility libraries. One of the most common ones is cygwin1.dll, part of the Cygnus Group's cygwin project.

  3. #3
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    Quote Originally Posted by lakerdonald
    You can run a Linux-compiled executable under windows by using one of many compatibility libraries. One of the most common ones is cygwin1.dll, part of the Cygnus Group's cygwin project.
    AFAIK, even cygwin won't be able to run the binaries compiled on linux in windows. Because the executable file formats are different.

    Even for an a.out (COFF) to be executable on windows, it needs to be converted into a Windows-PE by prepending proper headers to it.

    If I remember correctly, there is a good tech. paper available on DJ Delorie's site - http://www.delorie.com/djgpp/ about the same issue.

    Or did we have a discussion on his mailing list, I don't recall..

    Here, he describes the exe file format for DOS:
    http://www.delorie.com/djgpp/doc/exe/

    BTW, DJ Delorie wrote/maintains one such port of gcc for windows - just like cygwin.
    The Unforgiven
    Registered Linux User #358564

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •