TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: All
from: Bob Stout
date: 2003-09-25 02:59:56
subject: Re: GNU...

From: rbs{at}snippets.org
To: c_echo{at}yahoogroups.com

On Wed, 24 Sep 2003 Hans Andersson wrote:

> Is this some kind of a weird joke???
>
> #include 
>
> int main()
> {
>  printf("Hello World");
>  return 0;
> }
>
> The GNU compiler for DOS produces 80kb .exe for this test! Is the GNU
> compiler djgpp a toy thing?

DJGPP isn't one of the world's best gcc implementations. By comparison,
the MinGW32 port of gcc will compile your test program to only 9465 bytes.
In addition, it offers vastly improved Posix compliance, even supporting
fork() and the opendir() functions. Another advantage of MinGW32 is that
it uses MS RTL's and therefore you can write programs which don't have to
carry the GPL.

IMO, yes, DJGPP is a toy (dissenting opinions to /dev/null). It's only
saving grace is that it does run on DOS - MinGW32 runs on a Win32 host.
However, using some of the wonderful Posix features that MinGW32 supports
will mean your program will only run on a Win32 target.

If you want to write small DOS programs using a compiler that is both
hosted on and targets DOS, your choices are limited, but probably your
best bet would be one of the older free versions of Borland or Watcom C.
The best, in terms of code size, speed, and compatibility with DOS C
standards (i.e. MSC compatible) is Digital Mars C/C++, also available
free. Again though, the DMC compiler and tools are written to run on a
Win32 host and won't run on a DOS host.

-------------------------------------------------------------
Consulting: http://www.MicroFirm.biz/
Web graphics development: http://Image-Magicians.com/
Software archives: http://snippets.snippets.org/
  c.snippets.org/   cpp.snippets.org/      java.snippets.org/
  d.snippets.org/   python.snippets.org/   perl.snippets.org/
  dos.snippets.org/ embedded.snippets.org/ apps.snippets.org/
Audio and loudspeaker design:
  http://LDSG.snippets.org/   http://www.diyspeakers.net/

--- SoupGate-Win32 v1.05
* Origin: rbs{at}snippets.org (2:292/516.666)
SEEN-BY: 633/267 270
@PATH: 292/516 854 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.