comp.lang.ada
 help / color / mirror / Atom feed
* Mixed Ada and C++ Programs
@ 2004-08-17 11:12 Harry Overs
  2004-08-17 11:26 ` Jean-Marc Bourguet
  0 siblings, 1 reply; 3+ messages in thread
From: Harry Overs @ 2004-08-17 11:12 UTC (permalink / raw)


I have an Ada program which has a C++ interface to it, although I can get
the program to compile and run ok the problem that I have is that when I
change the C++ interface to use any system files, i.e. fstream.h,
iostream.h, I get unresolved extern errors when I try to link it (#including
stdio and some other files work ok).

Does anyone know what I am doing wrong?

many thanks,





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

* Re: Mixed Ada and C++ Programs
  2004-08-17 11:12 Mixed Ada and C++ Programs Harry Overs
@ 2004-08-17 11:26 ` Jean-Marc Bourguet
  2004-08-17 18:42   ` Guillaume Foliard
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Marc Bourguet @ 2004-08-17 11:26 UTC (permalink / raw)


"Harry Overs" <hovers@dera.gov.uk> writes:

> I have an Ada program which has a C++ interface to it, although I can get
> the program to compile and run ok the problem that I have is that when I
> change the C++ interface to use any system files, i.e. fstream.h,
> iostream.h, I get unresolved extern errors when I try to link it (#including
> stdio and some other files work ok).
> 
> Does anyone know what I am doing wrong?

Forgetting the C++ libraries in the link?

Yours,

-- 
Jean-Marc



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

* Re: Mixed Ada and C++ Programs
  2004-08-17 11:26 ` Jean-Marc Bourguet
@ 2004-08-17 18:42   ` Guillaume Foliard
  0 siblings, 0 replies; 3+ messages in thread
From: Guillaume Foliard @ 2004-08-17 18:42 UTC (permalink / raw)


Jean-Marc Bourguet wrote:

> "Harry Overs" <hovers@dera.gov.uk> writes:
> 
>> I have an Ada program which has a C++ interface to it, although I can get
>> the program to compile and run ok the problem that I have is that when I
>> change the C++ interface to use any system files, i.e. fstream.h,
>> iostream.h, I get unresolved extern errors when I try to link it
>> (#including stdio and some other files work ok).
>> 
>> Does anyone know what I am doing wrong?
> 
> Forgetting the C++ libraries in the link?

Moreover, if you are using GNAT do not forget to add the following to the
gnatmake list of options :

 --LINK=c++



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

end of thread, other threads:[~2004-08-17 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-17 11:12 Mixed Ada and C++ Programs Harry Overs
2004-08-17 11:26 ` Jean-Marc Bourguet
2004-08-17 18:42   ` Guillaume Foliard

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