Mail Archives: djgpp/1997/02/20/08:15:56
From: | Brian Osman <osmanb AT rpi DOT edu>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Forgive my ignorance, but can someone answer a question for me?
|
Date: | Sat, 15 Feb 1997 19:57:47 -0500
|
Organization: | Rensselaer Polytechnic Institute, Troy NY, USA
|
Lines: | 37
|
Message-ID: | <33065B8B.23B8@rpi.edu>
|
References: | <5e5kn5$n1d$1 AT scoop DOT suba DOT com>
|
Reply-To: | osmanb AT rpi DOT edu
|
NNTP-Posting-Host: | darkwing.stu.rpi.edu
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Tim Williams wrote:
>
> I'm under the impression that djgpp is a gcc compiler for DOS,
> correct?
> Assuming I am, gcc is suppost to be a cross-platform compiler, and the
> coding for gcc applications isn't suppost to use any hardware-specific
> instructions, correct?
Any programs written which conform strictly to the C standard should
compile across all platforms. There is a problem though. Nothing useful
has ever been written which did just that. (Please hold off on flames,
I know that's not entirely true.) Read below...
> If I am correct so far, wouldn't that mean that gcc applications
> written for Unix systems could be compiled under DOS using djgpp?
> If so, what is the extent? Could I compile X Windows under DOS, for
> instance? I am not a programmer, or a techie, so I know I'm kind of
> ignorant about all of this, but if anyone could help me out on
> cross-compatibility between gcc applications under Unix being compiled
> under djgpp for DOS, please let me know..
> (Email if possible, thanks!)
>
> Tim Williams
> twilliams AT sales DOT ispi DOT net
The C standard only defines basic routines, and most applications then
use hardware specific features in addition. X-Windows relies on a great
deal of hardware specific code, and all network applications use the
sockets interface, which is not part of DOS. The short answer is that
compiling even a simple UNIX program in DOS can be prohibitively
difficult,
never mind compiling something reasonably large. (The converse is also
true.) This, of course, has nothing to do with the compilers, it's just
that it is much easier to write software to a specific machine, so most
people do.
Brian
- Raw text -