[comp.lang.c++] How common are C++ Compilers?

matsl@nada.kth.se (Mats Luthman) (11/20/89)

Is C++ a suitable implementation language if you are going to develop a
fairly large program that you want to run on many different systems?

Are there C++ compilers for all major operating systems (IBM systems, VMS,
all UNIX systems, MS-DOS and extended memory (4 Mbyte and more, maybe
generating 386 code), OS/2)? Is there a greater chance of finding an Ada
compiler than a C++ compiler on a randomly chosen system?

How portable is C++ code between different systems?

Are the C++ compilers on UNIX good (fast, error free et.c.)? Which SUN
computers does the GNU C++ compiler run on?

If you want to port to a system that only has a C compiler, are there
any chances whatsoever of getting the C code you get from the AT&T C++
compiler to run on it?



Mats Luthman

MARKV@kuhub.cc.ukans.edu (MARK GOODERUM - UNIV. OF KANSAS ACS - MARKV@UKANVAX) (12/14/89)

In article <2351@draken.nada.kth.se>, matsl@nada.kth.se (Mats Luthman) writes:
> Is C++ a suitable implementation language if you are going to develop a
> fairly large program that you want to run on many different systems?
> 
> Are there C++ compilers for all major operating systems (IBM systems, VMS,
> all UNIX systems, MS-DOS and extended memory (4 Mbyte and more, maybe
> generating 386 code), OS/2)? Is there a greater chance of finding an Ada
> compiler than a C++ compiler on a randomly chosen system?

C++ compilers are available on a variety of systems.  PC-DOS, Macintosh,
Amigas (I enjoy this one...), Unix, and OS/2 and more.  I'd say chances
are about equal with C++ maybe having a slight edge on PCs and Ada having
a slight edge in minis and mainframes.

> How portable is C++ code between different systems?

Like C or most other high level languages, C++ is VERY portable IF you only
do things defined in the language.  Of course accessing the BIOS on aDOS
application, or using the graphics coprocessor on the Amiga aren't very
portable.
 
> Are the C++ compilers on UNIX good (fast, error free et.c.)? Which SUN
> computers does the GNU C++ compiler run on?

Couldn't say, although I have heard g++ (GNU C++) does have some compatibility
problems.

> If you want to port to a system that only has a C compiler, are there
> any chances whatsoever of getting the C code you get from the AT&T C++
> compiler to run on it?

The AT&T C++ preprocessor 'cfront' used in many systems outputs real honest
to goodness C code.  You could in theory compile your code on a C++ system
and take the C code back to your little machine.  The problem with this
approach is the Cplusplus library that contains many functions reference
by the C code cfront produces.  You COULD liscense the stuff from AT&T
and port it, but that would be major would and lots of $$.

Honestly, I cant think of any system (of sufficient size to support a 
'decent' development environmen) that doesnt have C++ available except
if your doing embedded systems development, in which case there are 
C++ cross development systems coming out for most processor families.
 
> Mats Luthman
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum					   Academic Computing Services
MARKV@UKANVAX.BITNET					  University of Kansas
	"Merry Christmas and thank goodness the year is over!"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

dmg@ssc-vax.UUCP (David Geary) (12/16/89)

Mark Goodurum writes:
In article <2351@draken.nada.kth.se>, matsl@nada.kth.se (Mats Luthman) writes:
>> Is C++ a suitable implementation language if you are going to develop a
>> fairly large program that you want to run on many different systems?
>> 

  Well, that depends upon what you'd define 'many different systems' to be.
  I am working on a graphical user interface for a data management program
  that has to be ported to:

  SUN
  Apollo
  IBM PC
  Intergraph
  MicroVax
  IBM RT
  HP3000
  Macintosh
  Cimlinc    ( what ?? )

  To me, that qualifies as 'many different systems'.  I would love to use
  C++, but I cannot, because I cannot get C++ compilers for all of the
  above systems.  So, I am stuck writing in plain old C.

>> Are there C++ compilers for all major operating systems (IBM systems, VMS,
>> all UNIX systems, MS-DOS and extended memory (4 Mbyte and more, maybe
>> generating 386 code), OS/2)? Is there a greater chance of finding an Ada
>> compiler than a C++ compiler on a randomly chosen system?

>C++ compilers are available on a variety of systems.  PC-DOS, Macintosh,
>Amigas (I enjoy this one...), Unix, and OS/2 and more.  I'd say chances
>are about equal with C++ maybe having a slight edge on PCs and Ada having
>a slight edge in minis and mainframes.

  I would agree with the fact that Ada is liable to be more prevalent on
  minis and mainframes.

>> How portable is C++ code between different systems?

>Like C or most other high level languages, C++ is VERY portable IF you only
>do things defined in the language.  Of course accessing the BIOS on aDOS
>application, or using the graphics coprocessor on the Amiga aren't very
>portable.

  Well, at this stage of the game, I think you may run into some trouble
  with using C++ 2.0 features.  Not all vendors have come out with
  2.0 compatible compilers...

>> Are the C++ compilers on UNIX good (fast, error free et.c.)? Which SUN
>> computers does the GNU C++ compiler run on?

  Well, C++ compilers are most likely going to be slower than your
  average C compiler due to the fact that most produce C code, which
  then must be compiled as usual.

>> If you want to port to a system that only has a C compiler, are there
>> any chances whatsoever of getting the C code you get from the AT&T C++
>> compiler to run on it?

>The AT&T C++ preprocessor 'cfront' used in many systems outputs real honest
>to goodness C code.  You could in theory compile your code on a C++ system
>and take the C code back to your little machine.  The problem with this
>approach is the Cplusplus library that contains many functions reference
>by the C code cfront produces.  You COULD liscense the stuff from AT&T
>and port it, but that would be major would and lots of $$.

  Yeah, this idea occurred to me a while back, but it is unworkable
  due to the fact that you must link in libraries that have many 
  built in functions defined.  You need not only the C code, but
  the C code for the libraries.

>Honestly, I cant think of any system (of sufficient size to support a 
>'decent' development environmen) that doesnt have C++ available except
>if your doing embedded systems development, in which case there are 
>C++ cross development systems coming out for most processor families.
 
  Well, how about a Cimlinc?  That sucker was the real clincher in
  holding me back from using C++.  Of course, no one reading this
  will even know what a Cimlinc is.  (Cimlincs are discontinued
  Unix machines which support a 'decent' (word used very usely)
  development environment, but it will *never* have a C++ compiler.
  ;-(


-- 
~~~~~~~~  David Geary, Boeing Aerospace, Seattle  ~~~~~~~~
~  Seattle:  America's most attractive city ...          ~
~            to the *jetstream*.                         ~

MARKV@kuhub.cc.ukans.edu (MARK GOODERUM - UNIV. OF KANSAS ACS - MARKV@UKANVAX) (12/21/89)

>   Well, that depends upon what you'd define 'many different systems' to be.
>   I am working on a graphical user interface for a data management program
>   that has to be ported to:
> 
>   SUN
>   Apollo
>   IBM PC
>   Intergraph
>   MicroVax
>   IBM RT
>   HP3000
>   Macintosh
>   Cimlinc    ( what ?? )
> 
>   To me, that qualifies as 'many different systems'.  I would love to use
>   C++, but I cannot, because I cannot get C++ compilers for all of the
>   above systems.  So, I am stuck writing in plain old C.
> 
>>> If you want to port to a system that only has a C compiler, are there
>>> any chances whatsoever of getting the C code you get from the AT&T C++
>>> compiler to run on it?
> 
>>The AT&T C++ preprocessor 'cfront' used in many systems outputs real honest
>>to goodness C code.  You could in theory compile your code on a C++ system
>>and take the C code back to your little machine.  The problem with this
>>approach is the Cplusplus library that contains many functions reference
>>by the C code cfront produces.  You COULD liscense the stuff from AT&T
>>and port it, but that would be major would and lots of $$.
> 
>   Yeah, this idea occurred to me a while back, but it is unworkable
>   due to the fact that you must link in libraries that have many 
>   built in functions defined.  You need not only the C code, but
>   the C code for the libraries.

I checked a little more, I've been told that initial liscence of cfront
from AT&T is $20,000 plus royalties on sales, although that includes source
to cfront, cpp (the c++ preprocessor), and the C++ libraries.  So it's 
possible but not viable...
 
>>Honestly, I cant think of any system (of sufficient size to support a 
>>'decent' development environmen) that doesnt have C++ available except
>>if your doing embedded systems development, in which case there are 
>>C++ cross development systems coming out for most processor families.
>  
>   Well, how about a Cimlinc?  That sucker was the real clincher in
>   holding me back from using C++.  Of course, no one reading this
>   will even know what a Cimlinc is.  (Cimlincs are discontinued
>   Unix machines which support a 'decent' (word used very usely)
>   development environment, but it will *never* have a C++ compiler.
>   ;-(
Youve got me there, but what kind of Unix does it run?  Have you checked
into porting g++?  (GNU C++)  You need gcc and the binutils.  Sources
for all of these are available at prep.ai.mit.edu for anonymous FTP.

Gcc (and g++) generate real code, the code gereration is as portable as 
can reasonably be expected.  Basically you need to supply 2? machine 
specific configuration files, including things like executable format,
instructions, addressing mode.  There is already support for about a dozen
or more machines, on a variety of processors.  If the Cimlinc uses some
kind of common processor, then the port is even easier.

BTW, speaking of g++/gcc... Does anyone know of any work being done to
port it to RISC (MIPS chips) based Ultrix?  Weve got some DECSystems here
now and we dont' want to reinvent the wheel.
  
> ~~~~~~~~  David Geary, Boeing Aerospace, Seattle  ~~~~~~~~
> ~  Seattle:  America's most attractive city ...          ~
> ~            to the *jetstream*.                         ~
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\   Merry Christmas !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  gooderum	      \ \  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: mark@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~