home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7326 < prev    next >
Encoding:
Text File  |  1993-01-05  |  2.6 KB  |  60 lines

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