On 9/1/2026 11:46 AM, Eliot Moss wrote:
On 9/1/2026 2:18 PM, Takashi Yano via Cygwin wrote:
On Tue, 1 Sep 2026 10:54:18 -0700
Arthur Schwarz via Cygwin <[email protected]> wrote:

Using cygwin, is there any way to execute a Linux executable, as in:

  > ./linux.exe

If by ‘Linux executable’ you mean an ELF executable file,
the answer is no. You have to rebuild the program from
source in Cygwin.

At its heart, cygwin is a Windows *library* file, cygwin.dll, that
you link with a program compiled and linked using cygwin tools,
which run under Windows.  You get a Windows executable whose
library API mimics POSIX as closely as possible under Windows.

To run true Linux executables, you need a Linux virtual machine,
such as Windows Subsystem for Linux, Oracle, or VMWare.  For some
purposes qemu also works for that.

I use all three, that is, Windows, cygwin with many command line (bash)
and X windows GUI programs, and WSL, each for its own purposes.  I have
also gotten good mileage from Oracle VMs and such in the past.

Regards - Eliot Moss

Thank Eliot;

My thought was that the Linux executable (ELO code?) can be reorganized to duplicate the load code for a Windows machine, and that then the Windows machine is presented with acceptable code. Something like:

     Unix Executable -> cygwin reformatting -> Windows executable -> execute

Without the need to recompile the code under a cygwin framework (or a Windows framework).

My thought was that it would be possible to reinterpret the Unix load code, reformat it and generate a Windows .exe file, and that someone has already done this and, perhaps, made it 'part of' the bash shell. Apparently this can not be done.

Basically, load code is load code. The needs to load code in on OS are the same needs in another, and although the format of the load code is different between OSs, the needs are the same and that one format can be converted to another. In a different context gcc (the GNU compiler set) has a similar problem and solves it by converting the input language to some generic internal format which is reformatted depending on the target computer (a few steps are left out here). Given this it seemed to me that a similar, but easier, issue would be involved for load formats. Unfortunately I appear to be wrong.

Oh well, back to Plan A.

art


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to