Subject: Re: g++ HELLO WORLd
To: Maurizio Caloro <>
From: Richard Rauch <>
List: netbsd-users
Date: 07/21/2003 04:38:05

It's not 100% clear what you're trying to do.

Leaving aside prototyping problems, the sample program you show should
compile with more or less any C or C++ compiler.  You should be able to
compile it on NetBSD and get a NetBSD executable, and compile it under
the Evil Empire's[*] OS to get an Evil Empire executable.  What happens
when you try to compile it under the Evil Empire?

Or do you mean that you want to compile it ONCE and run the ONE executable
on MULTIPLE operating systems?  That's a bit more involved...  Every operating
system establishes certain conventions for native executables; there is no
universal standard.

NetBSD has provisions for running executables for a number of other types of
systems (GNU/LINUX, FreeBSD, etc.); this support varies with which NetBSD
port, and only applies on ports where the other OS runs on the same CPU
(FreeBSD and i386, for example).  There is *limited* support for Evil
Empire executables.  See the man-page compat_peacoff(8).  You will need to
go to the PEACE project to get some support .DLL files and other stuff.
I have never been able to make this work much, if at all.  Alternatively,
you can use an explicit Evil Empire emulation program (such as twin,
rewind, or WinE).  I have had limited success with these (but better than
with PEACE, but not good enough to install/run the one or two Evil Empire
programs that I'd like to use).

So far as I know, the Evil Empire has no support for running anything
other than its own native executables.

With both NetBSD and the Evil Empire, you can run whole system emulations
(such as bochs or plex86) on which you can install another OS, of course...
But this starts to get a bit far afield from what you probably had in

I hope that that helps clarify things.  Good luck.

[*]: Occasionally, users of a certain Monopoly Software's OS will post a
random note to a NetBSD mailing list, asking us for drivers for their
hardware (which they want to use under their OS).  It has been suggested
that mentioning the Evil Empire by name gets NetBSD's help lists to come
up on search-engines, and then users not bothering to figure out what
they've stepped into just fire off a random message.

So, I name the Evil Empire only by epithet.  (^&  I don't know if it really

[**]: No small animals were maimed in the production of this email.

  "I probably don't know what I'm talking about."