D, Java? To D or not to D?
Daniel Keep
daniel.keep+lists at gmail.com
Fri Jan 5 20:44:21 PST 2007
Frits van Bommel wrote:
> I don't think there's currently any way to have it run directly on
> Windows and Linux simply because there's AFAIK no executable format
> that's supported by both OSs (ELF is supported on multiple OSs, but
> Windows doesn't support it). Furthermore, all executable formats I know
> of (except for plain binary, which AFAIK Linux doesn't support[1]) have
> some (unique) signature in the first few bytes, so a file can't be
> multiple of these formats at the same time.
>
> So you'd need to either using some sort of custom loader binary for each
> OS or modify OSs to support a common binary format (i.e. a custom
> loader, but integrated into the OS).
>
>
> [1]: Windows "supports" these for programs that fit in 64k: .com files
> are plain binaries. They're not really useful for anything but backwards
> compatibility though.
Linux can support PEs (ie: .exe files); that's what Wine is for.
Aside: AFAIK, Mono (open source .NET implementation) is a bit more
tricksy: its' compilers generate PEs using a Windows stub, but when you
go to run said programs, it ignores the stub (it just looks for which
.NET class to fire off and goes from there).
If Windows won't support it, you have to change everything else :3
-- Daniel
More information about the Digitalmars-d
mailing list