[Tutor] Re: Curious newbie

Derrick 'dman' Hudson dman@dman.ddts.net
Tue, 23 Jul 2002 18:09:35 -0500


--0eh6TmSyL6TZE2Uz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 23, 2002 at 02:38:05PM +0000, Einar Th. Einarsson wrote:
| On Tuesday 23 July 2002 13:52, Marc wrote:
| > Derrick 'dman' Hudson (dman@dman.ddts.net) wrote:
| > > Actually, just to be pedantic, the C compiler generates a file which
| > > still needs a runtime environment and "interpreter" to run.
| > [...snip...]
| > >  The only difference is the C runtime (for that OS, namely
| > > 'libc.so' or 'msvcrt.dll') is bundled with the OS and so people tend
| > > not to see the simlarities.
| >
| > Great Dman!
| > You just turn on a light the size of moon over my head...
| > What if some good brave soul do a libc for windows?
| > Better yet, a msvcrt.dll for linux so that we could run/develop for win=
dows
| > from linux.
| > Man, that would be just great.
|=20
| As someone who has been doing exactly that, I cuncurr ;)
| The C-libraries have become pretty standard over the years,

Almost.  The _core_ libraries defined by the ANSI/ISO standard are
indeed standard (AFAIK).  However there are lots and lots of quirks in
each OS (even if you don't get out of unix-land).

| so if one follows said standard the c code will compile with any
| complient compiler on any complent os.

Which gives you source-level compatibility, but that doesn't help you
play Quake or Warcraft on your shiny robust linux system.

| If you're interested in doing Windows programming on linux,

| check out cygwin or mingw; they both offer cross-platform c/c++
| tools.

'libcygwin1.dll' is "libc for windows"

'wine' is "windows for unix"

The two projects are fundamentally different (not just counterparts)
due to the way the target software is structured.

Cygwin provides a source-compatible system and compiler.  It allows
you to compile a lot of unix software (eg mutt or vim or gtk)
out-of-the-box on your windows machine.  It is only source-compatible,
not binary.  The compiler produces PE executables and .dlls just like
Microsoft does.  This tactic is used since all the software you want
to build with this system is freely available in source form.

Wine, however, is a binary-level emulator intended to run PE
executables (and DLLs) intended for windows.  The reason for this is
nearly all windows software (eg Warcraft or MS Office) is available in
binary form only.  It is impossible to "just recompile with the new
library".

-D

PS. as for the interleaved '|' and '>', the '>' is inserted by
    someone else's mailer when they reply to a message.  The '|' is
    inserted by my mailer when I reply.  They are interleaved when we
    reply to each other's messages.  The '>' is most common, but I
    find it distracting and prefer '|'.  Some people even use '%' or
    do wacky indenation and labelling things with their quoting.

--=20
He who belongs to God hears what God says.  The reason you do not hear
is that you do not belong to God.
        John 8:47
=20
http://dman.ddts.net/~dman/

--0eh6TmSyL6TZE2Uz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj094i8ACgkQO8l8XBKTpRQi6QCfV2TccDlsVMJsS1dhssl5H0za
6msAniO4JPCXhJIpJW7aqWHWWDn0AWuf
=8s9X
-----END PGP SIGNATURE-----

--0eh6TmSyL6TZE2Uz--