home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!usenet.ucs.indiana.edu!bronze.ucs.indiana.edu!sthiagar
- From: sthiagar@bronze.ucs.indiana.edu (sivasailam thiagarajan)
- Subject: Re: CSet/2 vs. Watcom C?
- Message-ID: <C0DyBy.9q3@usenet.ucs.indiana.edu>
- Sender: news@usenet.ucs.indiana.edu (USENET News System)
- Nntp-Posting-Host: bronze.ucs.indiana.edu
- Organization: Indiana University
- References: <1992Dec30.222721.29697@samba.oit.unc.edu>
- Distribution: na
- Date: Tue, 5 Jan 1993 14:45:34 GMT
- Lines: 46
-
- In article <1992Dec30.222721.29697@samba.oit.unc.edu> Brandon.Vanevery@launchpad.unc.edu (Brandon Vanevery) writes:
- >
- >Which compiler is "better" for OS/2 programming? Why? Is there even any
- >contest?
- ------
- To toss my $0.02 in, I have both compilers and prefer Watcom C 386
- 9.0. Why? The executables it produces are consistently tighter. For
- example, I compiled my fBMP program (available as fbmp.zip in
- directory /pub/os2/2.0/graphics on Hobbes) using the following
- commands:
-
- wcl386 /l=os2v2_pm /k65536 /omaxet /zp4 /4r fbmp.c
-
- for Watcom, and
-
- icc /C+ /O+ /Sp4 fbmp.c
- link386 /a:4 /base:65536 /exepack fbmp,,nul,,fbmp
-
- for C Set/2 (*not* to be confused with C/2; does anyone else find the
- distinction confusing?). The results? Watcom produced an executable of
- 18944 bytes; C Set/2 produced one that was 34609 bytes long. That's a
- difference of 15665 bytes, or about 45%! While most program don't show
- such a dramatic difference, Watcom executables tend to be 10% - 35%
- tighter than their C Set/2 equivalents. And I have NEVER found a
- program where Watcom made a bigger EXE than C Set/2.
-
- Why do I keep both compilers around? Some of the huge programs I've
- ported from other platforms crash and burn under Watcom, but run under
- C Set/2. For instance UMB Scheme. This large interpreter was written
- for Unix, but was well-engineered so it's fairly easy to port. I
- compiled and linked it FOR DOS using Watcom. The resulting .EXE ran
- well on 386s, and in OS/2 DOS boxes (though you have to increase the
- amount of DPMI). I changed the flags to compile and link for OS/2. The
- resulting .EXE blows up shortly after it starts. I then took the
- original source and tried porting to C Set/2. The executable is bigger
- than the one that came out of Watcom, but it actually works!
-
- (On the other hand, there's at least *one* program that "ported" under
- Watcom and failed under C Set/2. That's POV-Ray Tracer. Of course,
- this is cheating, since the version I "ported" was written for Watcom
- C 386 for DOS!)
-
- Anyway, this is just my two cents worth.
-
- Raja Thiagarajan
- (sthiagar@bronze.ucs.indiana.edu)
-