[comp.lang.c] Recommend a C compiler?

walter@hpclwjm.HP.COM (Walter Murray) (08/16/89)

This OS-specific question probably isn't appropriate for discussion
here, but I would appriciate mail from persons with experience on
MSDOS.  

I know C but am a total novice in the world of PC compatibles.
Which compiler should I buy for my home use?  I want good quality,
a commitment to ANSI C, responsiveness in fixing bugs, and good
documentation.  I expect to be doing a variety of applications,
including graphics.

Thanks for your suggestions.

Walter Murray
walter@hpda.HP.COM
------------------

pmaniac@walt.cc.utexas.edu (Noah Friedman) (08/17/89)

In article <660054@hpclwjm.HP.COM> walter@hpclwjm.HP.COM (Walter Murray) writes:
>I know C but am a total novice in the world of PC compatibles.
>Which compiler should I buy for my home use?  I want good quality,
>a commitment to ANSI C, responsiveness in fixing bugs, and good
>documentation.  I expect to be doing a variety of applications,
>including graphics.

My personal favorite is Turbo C ( (c) Borland International). It
follows the ANSI C standard, but the compiler directives can be
modified so that it'll handle the more lax format of UNIX C. Also, I
believe Borland makes the only compiler with an "integrated
environment", which really makes it handy to debug & run programs. 

My only criticism of the Turbo C library are the graphics functions,
however. Borland didn't include any graphics at all with the first
version, but by version 1.5 included a set of routines that did all
sorts of crazy things with memory allocation & so forth. I got fed up
with it and wrote my own graphics library. 

Turbo C seems to be the fastest compiler available for the IBM,
though. Documentation is fair (library functions are documented in K&R
format). Succesive versions seem to have fewer bugs & optimize a bit
more, and version 2.0 has an in-line source debugger.

-------------------------------------------------------------------------------
pmaniac@walt.cc.utexas.edu.UUCP (Noah Friedman)

Any opinions expressed in this article are entirely my own and are not
representative of any official organization, including UT Austin.
-------------------------------------------------------------------------------

SMITHJ@ohstpy.mps.ohio-state.edu (08/17/89)

In article <660054@hpclwjm.HP.COM>, walter@hpclwjm.HP.COM (Walter Murray) writes:

> I know C but am a total novice in the world of PC compatibles.
> Which compiler should I buy for my home use?  I want good quality,
> a commitment to ANSI C...

My personal favorite is Microsoft QuickC which is an integrated environment 
(contrary to a previous poster's claim that TurboC was the only one).
I prefer it over Borland's TurboC because I have been unable to find a way to
use external object code libraries which is very easy to do in QuickC.

> ...responsiveness in fixing bugs, and good
> documentation.  I expect to be doing a variety of applications...

Microsoft provides you with a number to call where they have technicians answer 
any questions you might have.  They also provide bug free updates free of charge
and full updates for redused prices.
The documentation is very well written although not as well cross-referenced as 
I's like.

> ...including graphics.
The graphics suppport is not bad and is built in.

-- 
Has Your Family Tried A Powder Milk?

/* Jeffery G. Smith, BS-RHIT (AKA Doc. Insomnia, WMHD-FM)       *
 *    The Ohio State University, Graduate Physics Program       *
 *        3193 Smith Lab, Columbus, OH 43210  (614) 292-5321    *
 *    smithj@ohstpy.mps.ohio-state.edu                          */

henry@utzoo.uucp (Henry Spencer) (08/17/89)

In article <17200@ut-emx.UUCP> pmaniac@walt.cc.utexas.edu (Noah Friedman) writes:
>My only criticism of the Turbo C library are the graphics functions,
>however. Borland didn't include any graphics at all with the first
>version...

Perhaps because IBM didn't include any graphics hardware with the first 
version of the PC? :-)

(Please don't tell me about the various pieces of junk with three-letter
names ending in "GA".  The early members of that family are to graphics as
crayons are to Rembrandt.)
-- 
V7 /bin/mail source: 554 lines.|     Henry Spencer at U of Toronto Zoology
1989 X.400 specs: 2200+ pages. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

craigb@hp-sdd.hp.com (Craig Bosworth) (08/18/89)

Followup To: 
Distribution: 
Organization: Hewlett Packard, San Diego
Keywords: 

Contrary to a previous poster's assertion, there is a way to use external 
libraries with Turbo C (2.0, anyway).  You need to create a project file
(which lists module dependencies, etc.), including the library name.   

A project file might contain (from Turbo C User's Guide, p. 36):

		MYMAIN (MYFUNCS.H, SPECIAL.OBJ)
		MYFUNCS (MYFUNCS.H, OTHER.LIB)
		SPECIAL.OBJ
		OTHER.LIB

This (among other things) causes OTHER.LIB to be linked in.  For a discussion
of project files see the User's Guide, pp. 29-36.

I use Turbo for its speed, debugger, and integrated environment.  Microsoft
offers these features, but to get them you have to use QuickC, then (if
necessary) switch to the fullblown command line version for production code.
I am concerned, however about Turbo's reputation for being a little buggy. It
hasn't gotten me yet, but if it does it of course will be at the worst possible
time...

BOS

Direct "my compiler's better than your compiler" posts to
alt.religion.computers, please.
-- 
Craig Bosworth  (619) 592-8609           16399 West Bernardo Drive
Hewlett-Packard, San Diego Division      San Diego, CA  92127-1899
UUCP     : {hplabs|nosc|hpfcla|ucsd}!hp-sdd!craigb
Internet : craigb%hp-sdd@hp-sde.sde.hp.com (or @nosc.mil, @ucsd.edu)

2014_5001@uwovax.uwo.ca (08/18/89)

In article <3642@ohstpy.mps.ohio-state.edu>, SMITHJ@ohstpy.mps.ohio-state.edu writes:
> In article <660054@hpclwjm.HP.COM>, walter@hpclwjm.HP.COM (Walter Murray) writes:
> 
>> I know C but am a total novice in the world of PC compatibles.
>> Which compiler should I buy for my home use?  I want good quality,
>> a commitment to ANSI C...

Turbo C.  It seems to have a better ANSI C compatibility than Microsoft. 
(Maybe this has changed under 5.0--I only found an incompatibility in 4.0).

> 
> My personal favorite is Microsoft QuickC which is an integrated environment 
> (contrary to a previous poster's claim that TurboC was the only one).
> I prefer it over Borland's TurboC because I have been unable to find a way to
> use external object code libraries which is very easy to do in QuickC.
> 

Perhaps you reviewed an old version of TurboC.  If you have the manuals, you
find that the project facility allows a beautifully elegant way of linking in
both .LIB's and .OBJ's.

The QuickC user-interface is driven towards a mouse.

>> ...responsiveness in fixing bugs, and good
>> documentation.  I expect to be doing a variety of applications...
> 
> Microsoft provides you with a number to call where they have technicians answer 
> any questions you might have.  They also provide bug free updates free of charge
> and full updates for redused prices.
> The documentation is very well written although not as well cross-referenced as 
> I's like.
> 

Turbo C provides online hypertext manuals.

>> ...including graphics.
> The graphics suppport is not bad and is built in.
> 

It does not support many display adapters.  Glancing through the manual, all I
could find was CGA/EGA/VGA support.  Where is Herc, ATT6300?

The BGI graphics interface is superb in that you can take user drivers, so that
your programs will be compatible with display adapters that don't exist as yet.


-- 
Alexander Pruss, at one of: Department of Applied Mathematics, Astronomy,
Mathematics, or Physics                     University of Western Ontario 
pruss@uwovax.uwo.ca         pruss@uwovax.BITNET          A5001@nve.uwo.ca 
-------------------------------------------------------------------------
Nothing made by Microsoft is good.  Who would write an operating system for
an Intel CPU?  Codeview bites, MeSsDOS is not a real operating system,
Microsoft C optimizes by deleting code, Microsoft MAKE doesn't take Makefiles,
Microsoft FORTRAN optimizes IO, not number crunching, and is otherwise totally
featurless, and most of all:  Bill Gates dresses funny.
-------------------------------------------------------------------------
The reason Microsoft made any money is because they went to bed with IBM.
-------------------------------------------------------------------------
IBM about Intel:  I liked the 8088 so much, I bought the company...
-------------------------------------------------------------------------
The Z80 bank switching is better than 8088 segmentation.  Now try the 6502:
that's a real processor.
-------------------------------------------------------------------------
The only thing wrong with the 386/486 is 8086 compatibility.
-------------------------------------------------------------------------
The opinions expressed are those of the inhabitants of P&A123B, and not the
Department.

eric@snark.uu.net (Eric S. Raymond) (08/19/89)

In <1989Aug17.162646.21826@utzoo.uucp> Henry Spencer wrote:
> (Please don't tell me about the various pieces of junk with three-letter
> names ending in "GA".  The early members of that family are to graphics as
> crayons are to Rembrandt.)

Much as I hate to defend IBM, and loath as I am to contradict you, I submit
that including 'VGA' as a piece of junk is untrue and unfair. Jaded as I am
after many a NCGE, the X kaleid demo on my new VGA monitor blew my socks off.
Of course, you did say *early* members....

(color X is fuuUUUUuuunnn...)
-- 
      Eric S. Raymond = eric@snark.uu.net    (mad mastermind of TMN-Netnews)

darcy@bbm.UUCP (D'Arcy Cain) (08/19/89)

In article <2420@hp-sdd.hp.com>, craigb@hp-sdd.hp.com (Craig Bosworth) writes:
> Followup To: 
> hasn't gotten me yet, but if it does it of course will be at the worst possible
> time...
Are you saying Microsoft has no bugs?  I can show you a while loop that
Microsoft turns into a do-while!! After numerous phone calls to the
line they laughingly refer to as technical support I finally solved the
problem by turning off optimization.  Seeing as I upgraded in order to
get optimization it seems a rather poor workaround.  

I also have Borland's Turbo C 2.0.  I don't know what their support is
like because I have never had to use it.  I suppose that is a point 
for them.

D'Arcy J.M. Cain
(darcy@bbm, cain!darcy@telly.on.ca)

Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) (08/21/89)

In an article of <15 Aug 89 17:20:55 GMT>, (Walter Murray) writes:

 >I know C but am a total novice in the world of PC compatibles.
 >Which compiler should I buy for my home use?  I want good quality,
 >a commitment to ANSI C, responsiveness in fixing bugs, and good
 >documentation.  I expect to be doing a variety of applications,
 >including graphics.

  I noticed you've already received a few answers, but nothing too    
comprehensive, so here goes:

Microsoft C     Not recommended for home use. Too expensive and extremely slow
5.1 ("MSC")     compile times. Also not very good for a novice and below 
                average graphics support. In the plus column, MSC does set the
                pace for PC compilers and is quite good in ANSI compatibility
                and documentation is excellent. Currently required for OS/2
                or MS Windows programming. Responsiveness to bug reports is
                next to non-existant ("wait for the next version"). The
                included CodeView debugger is long past being state-of-the- 
                art. Includes Quick C (see below) for faster development.

Turbo C 2.0     Very popular for good reason. Affordable and the fastest 
("TC")          compile times in the business. Graphics support is excellent
                but not too speedy. Documentation is voluminous but lacks
                examples - use the on-line THELP facility. A novice will need 
                some other book(s). Good ANSI and MSC compatibility. Borland 
                won't admit bugs very often, let alone fix them. Best bet is 
                their toll call BBS which contains all the latest patches. 
                Although their "integrated environment" (editor, compiler, and 
                debugger) is seductive to tyros, be forewarned that everything 
                in the package is a memory hog. The Turbo Debugger included in 
                the Professional Pack is excellent.

Zortech C/C++   FAIR WARNING OF POTENTIAL BIAS: My compiler of choice. 
1.07 ("ZTC")    Comparing apples to apples, cost with the separate Zortech
                C Debugger is about the same as TC. Compile times are 
                comparable to TC with the optimizer disabled. Optimized,
                compiles in roughly the same time as MSC, but produces 
                generally better code. Documentation is marginally adaquate
                but includes useful examples. Also includes an excellent on-
                line help facility. ANSI and MSC compatibility is a little less
                than the others, but has steadily improved. Excellent support
                (known bugs are admitted and work-arounds suggested) from
                Walter Bright's (the author's) BBS, although Zortech's own 
                support line is less useful - i.e. more typical. Graphics 
                support is better than MSC, less than TC though faster. The
                available C debugger is almost as good as Borland's. Going 
                with the full C++ package raises the price above Borland, but
                gives an excellent and economical introduction to C++ (Cfront
                1.2 compatible in the current release).

Quick C 2.0     Microsoft's "baby" compiler is actually quite good and a best
("QC")          buy among the majors. Code is often as good as, or better than,
                its "big brother", graphics support is up to TC levels and much
                faster, and the bundled begugger is actually better than
                CodeView in most respects. Paper documentation borders on being
                non-existant (the reason for the low price?) though. It tries 
                to make up for it by including an excellent and comprehensive 
                on-line help system. Another "integrated environment" compiler
                but one which (unlike TC) supports mice and/or your favorite
                editor. All other MSC comments apply.

Mix Power C     Not a world class compiler, Mix deserves mention here simply
                because it is the world's greatest buy. For the price of a
                decent tutorial ($20 - sic!), you get an excellent tutorial
                and a very good ANSI comforming compiler. This bears 
                repeating, the documentation for beginners is the best 
                available - period. I usually recommend folks start with Power 
                C and then migrate to another compiler as their needs evolve. 
                Including the complete library source and their quite good 
                debugger will still leave a few pennies change from a $50 
                bill. As to the compiler, it's not bad, generating fast though 
                not particularly tight code. It's especially good for 
                applications requiring excellent floating point support.

Watcom C        Generates the world's best code at the cost of the world's 
                worst compile times (makes MSC look speedy!) Also claims
                "100%" ANSI complaince - well, they're almost there. 
                Outstandingly good floating point operations, challenged only
                by Mix. A large part of its performance is due to the non-
                standard (i.e. 3rd party libraries may be a problem) practice
                of passing arguments to functions in registers. This can be
                disabled at the cost of performance dropping into MSC 
                territory. Most other MSC comments apply here as well, 
                including the higher cost and the inclusion of a "baby"
                compiler (Watcom Express C - not as good stand-alone as QC) to 
                overcome glacial compile time objections. 

2014_5001@uwovax.uwo.ca (08/21/89)

In article <2420@hp-sdd.hp.com>, craigb@hp-sdd.hp.com (Craig Bosworth) writes:
> Followup To: 
> Distribution: 
> Organization: Hewlett Packard, San Diego
> Keywords: 
> 
> Contrary to a previous poster's assertion, there is a way to use external 
> libraries with Turbo C (2.0, anyway).  You need to create a project file
> (which lists module dependencies, etc.), including the library name.   
> 
> A project file might contain (from Turbo C User's Guide, p. 36):
> 
> 		MYMAIN (MYFUNCS.H, SPECIAL.OBJ)
> 		MYFUNCS (MYFUNCS.H, OTHER.LIB)
> 		SPECIAL.OBJ
> 		OTHER.LIB
> 
> This (among other things) causes OTHER.LIB to be linked in.  For a discussion
> of project files see the User's Guide, pp. 29-36.
> 
> I use Turbo for its speed, debugger, and integrated environment.  Microsoft
> offers these features, but to get them you have to use QuickC, then (if
> necessary) switch to the fullblown command line version for production code.
> I am concerned, however about Turbo's reputation for being a little buggy. It
> hasn't gotten me yet, but if it does it of course will be at the worst possible
> time...
> 
> BOS
> 
> Direct "my compiler's better than your compiler" posts to
> alt.religion.computers, please.

Sorry if I wasn't very clear.  I did mean that you can use the project
facility.  I LOVE the project facility.  I find that it is no great problem to
specify a project file.

----
Alex Pruss
Department of Applied Mathematics, Astronomy,
Mathematics, or Physics                     University of Western Ontario 
pruss@uwovax.uwo.ca         pruss@uwovax.BITNET          A5001@nve.uwo.ca 

bright@Data-IO.COM (Walter Bright) (08/22/89)

In article <1SV1br#8yFGct=eric@snark.uu.net> eric@snark.uu.net (Eric S. Raymond) writes:
>Much as I hate to defend IBM, and loath as I am to contradict you, I submit
>that including 'VGA' as a piece of junk is untrue and unfair.

VGA has one inexplicable bug. That's the inability of it to be in text and
graphics mode *simultaneously*. I've used a number of Japanese MSDOS machines,
and all of them had that ability. It requires little overhead in terms
of circuitry. The big advantage of it is you can use a debugger in text
mode and have your app running in graphics mode, on the same screen! You
don't need the dual monitor kludge.

Another benefit is that since the text and graphics modes are independent,
and use separate video ram, TSRs can pop up in text mode without trashing
the graphics mode.

t-stevep@microsoft.UUCP (Steve Pool) (08/23/89)

In article <3587@uwovax.uwo.ca> 2014_5001@uwovax.uwo.ca writes:
>In article <3642@ohstpy.mps.ohio-state.edu>, SMITHJ@ohstpy.mps.ohio-state.edu writes:
>> In article <660054@hpclwjm.HP.COM>, walter@hpclwjm.HP.COM (Walter Murray) writes:
>> 
>>> I know C but am a total novice in the world of PC compatibles.
>>> Which compiler should I buy for my home use?  I want good quality,
>>> a commitment to ANSI C...
>
>Turbo C.  It seems to have a better ANSI C compatibility than Microsoft. 
>(Maybe this has changed under 5.0--I only found an incompatibility in 4.0).

MSC 4.0 is ancient history.

>Perhaps you reviewed an old version of TurboC.  If you have the manuals, you
>find that the project facility allows a beautifully elegant way of linking in
>both .LIB's and .OBJ's.

Which is almost identical to the method used in QuickC 1.0, 1.01, and 2.0.

>The QuickC user-interface is driven towards a mouse.

The QuickC UI offers an OPTION, unlike Turbo.  Every function performed
with the aid of a mouse may be performed equally well with accelerator
keys.

>Turbo C provides online hypertext manuals.

As does QuickC 2.0, including fully hyperlinked, functioning example
programs for every library function.

>It does not support many display adapters.  Glancing through the manual, all I
>could find was CGA/EGA/VGA support.  Where is Herc, ATT6300?

Hercules graphics have been supported since version 1.0.  AT&T support was
added with version 2.0.

Perhaps you should do more than glance through the manual.

Disclaimer:  I'm merely a pitiful summer hire, not involved with QuickC in
any job-related capacity.  I use it when writing my OWN code under MS-DOS,
and my personal feeling is that it's a slick piece of work.