comp.lang.ada
 help / color / mirror / Atom feed
* gnat-3_10p1-nt and C++ ?
@ 1997-12-31  0:00 Phil Brereton
  1997-12-31  0:00 ` R. Karl Werner
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Brereton @ 1997-12-31  0:00 UTC (permalink / raw)



I have just installed gnat and found out that it can compile C, I've
been told that to compile C++ I need cc1plus.exe and the C++ library.
How do I install these correctly? Any advice will be gratefully
received.
Best wishes for the New Year,
Phil




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnat-3_10p1-nt and C++ ?
  1997-12-31  0:00 gnat-3_10p1-nt and C++ ? Phil Brereton
@ 1997-12-31  0:00 ` R. Karl Werner
  1998-01-01  0:00   ` Robert Dewar
  1998-01-01  0:00   ` Jerry van Dijk
  0 siblings, 2 replies; 7+ messages in thread
From: R. Karl Werner @ 1997-12-31  0:00 UTC (permalink / raw)



If anyone can help I need the same info.  I'm using PCGRASP and would like
to have the C++ capability.

Karl

Phil Brereton wrote in message <34a9aa01.38963143@news.u-net.com>...
>I have just installed gnat and found out that it can compile C, I've
>been told that to compile C++ I need cc1plus.exe and the C++ library.
>How do I install these correctly? Any advice will be gratefully
>received.
>Best wishes for the New Year,
>Phil






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnat-3_10p1-nt and C++ ?
  1997-12-31  0:00 ` R. Karl Werner
  1998-01-01  0:00   ` Robert Dewar
@ 1998-01-01  0:00   ` Jerry van Dijk
  1 sibling, 0 replies; 7+ messages in thread
From: Jerry van Dijk @ 1998-01-01  0:00 UTC (permalink / raw)



In article <68dlab$sci$1@faatcrl.faa.gov> rkwerner@cybercomm.net writes:
>
>If anyone can help I need the same info.  I'm using PCGRASP and would like
>to have the C++ capability.
>
>>I have just installed gnat and found out that it can compile C, I've
>>been told that to compile C++ I need cc1plus.exe and the C++ library.
>>How do I install these correctly? Any advice will be gratefully
>>received.

I've added some notes on how I did this to my homepage at

   http://stad.dsl.nl/~jvandyk

And, of course, a very good, healthy and successful Ada 1998!

--

-- Jerry van Dijk | Leiden, Holland
-- Consultant     | Team Ada
-- Ordina Finance | jdijk@acm.org




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnat-3_10p1-nt and C++ ?
  1997-12-31  0:00 ` R. Karl Werner
@ 1998-01-01  0:00   ` Robert Dewar
  1998-01-02  0:00     ` Phil Brereton
  1998-01-01  0:00   ` Jerry van Dijk
  1 sibling, 1 reply; 7+ messages in thread
From: Robert Dewar @ 1998-01-01  0:00 UTC (permalink / raw)



Phil Brereton wrote in message <34a9aa01.38963143@news.u-net.com>...
>I have just installed gnat and found out that it can compile C, I've
>been told that to compile C++ I need cc1plus.exe and the C++ library.
>How do I install these correctly? Any advice will be gratefully
>received.
>Best wishes for the New Year,
>Phil


Just so the picture is clear, GNAT cannot compile C, it is an Ada 95
compiler! However, it is part of the GCC system, which is a multi-language
compiler. The standard distribution of GCC made with GNAT includes the
C compiler, but does not include the C++ compiler, which must be separately
obtained. The easiest thing is to obtain g++ separately and install it as
a completely separate program, but if you know what you are doing, you can
merge the two distribtions together to form a single unified gcc that
can compile C, Ada 95 and C++ (as well as Chill, Fortran 77 etc etc if
you install these as well).





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnat-3_10p1-nt and C++ ?
  1998-01-01  0:00   ` Robert Dewar
@ 1998-01-02  0:00     ` Phil Brereton
  1998-01-03  0:00       ` Jerry van Dijk
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Brereton @ 1998-01-02  0:00 UTC (permalink / raw)



dewar@merv.cs.nyu.edu (Robert Dewar) wrote:
>
>Just so the picture is clear, GNAT cannot compile C, it is an Ada 95
>compiler! However, it is part of the GCC system, which is a multi-language
>compiler. The standard distribution of GCC made with GNAT includes the
>C compiler, but does not include the C++ compiler, which must be separately
>obtained. The easiest thing is to obtain g++ separately and install it as
>a completely separate program, but if you know what you are doing, you can
>merge the two distribtions together to form a single unified gcc that
>can compile C, Ada 95 and C++ (as well as Chill, Fortran 77 etc etc if
>you install these as well).
>
Thanks for the clarification - I've installed the C++ compiler and
library, the compiler seems to work ok, but the linker keeps giving
"undefined reference to 'cout' " messages.  I think I'll take your
advice and try a separate program!
Phil




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnat-3_10p1-nt and C++ ?
  1998-01-02  0:00     ` Phil Brereton
@ 1998-01-03  0:00       ` Jerry van Dijk
  1998-01-03  0:00         ` Phil Brereton
  0 siblings, 1 reply; 7+ messages in thread
From: Jerry van Dijk @ 1998-01-03  0:00 UTC (permalink / raw)



In article <34acddaf.6456942@news.u-net.com> elwood@osc.u-net.com writes:

>Thanks for the clarification - I've installed the C++ compiler and
>library, the compiler seems to work ok, but the linker keeps giving
>"undefined reference to 'cout' " messages.  I think I'll take your
>advice and try a separate program!

If you installed the compiler according to the instructions on my
homepage this should work, as I used this installation to compile some
c++ code which I wanted to use from Ada.

Of course you did not forget to link in the standard (-lstdc++) or gcc
(lg++) libraries when compiling c++ code :-) If you want to use the c++
compiler, you are supposed to know how to use it!

--

-- Jerry van Dijk | Leiden, Holland
-- Consultant     | Team Ada
-- Ordina Finance | jdijk@acm.org




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnat-3_10p1-nt and C++ ?
  1998-01-03  0:00       ` Jerry van Dijk
@ 1998-01-03  0:00         ` Phil Brereton
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Brereton @ 1998-01-03  0:00 UTC (permalink / raw)



On Sat, 03 Jan 98 06:10:45 GMT, jerry@jvdsys.nextjk.stuyts.nl (Jerry
van Dijk) wrote:

>In article <34acddaf.6456942@news.u-net.com> elwood@osc.u-net.com writes:
>
>>Thanks for the clarification - I've installed the C++ compiler and
>>library, the compiler seems to work ok, but the linker keeps giving
>>"undefined reference to 'cout' " messages.  I think I'll take your
>>advice and try a separate program!
>
>If you installed the compiler according to the instructions on my
>homepage this should work, as I used this installation to compile some
>c++ code which I wanted to use from Ada.
>
>Of course you did not forget to link in the standard (-lstdc++) or gcc
>(lg++) libraries when compiling c++ code :-) If you want to use the c++
>compiler, you are supposed to know how to use it!
>
Ok, I admit my ignorance - thanks to your helpful instructions I've
now got everything working.  (C++ was not my main interest but reading
that it could be incorporated into Gnat, I thought it would be good to
add the capability.)  Thanks again,
Phil




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-01-03  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-31  0:00 gnat-3_10p1-nt and C++ ? Phil Brereton
1997-12-31  0:00 ` R. Karl Werner
1998-01-01  0:00   ` Robert Dewar
1998-01-02  0:00     ` Phil Brereton
1998-01-03  0:00       ` Jerry van Dijk
1998-01-03  0:00         ` Phil Brereton
1998-01-01  0:00   ` Jerry van Dijk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox