comp.lang.ada
 help / color / mirror / Atom feed
From: ganesh.ramasivan@gdcanada.com (Ganesh Ramasivan)
Subject: Calling C++ methods from Ada..
Date: 1 Dec 2004 13:11:20 -0800
Date: 2004-12-01T13:11:20-08:00	[thread overview]
Message-ID: <e8f9995c.0412011311.754046da@posting.google.com> (raw)

The following is a small test program in which the Ada function is
implemented in C++.

------------------------------
with System;

procedure CppTest is

procedure SET_TIME (hour: System.Address);
pragma import(CPP, SET_TIME, "Time::SetTime");

begin
  null;
end CppTest;

--------------------------------

I get the following error when I compile this code using the GHS Ada
compiler under Solaris 2.8. Can anybody please tell me what I am doing
wrong?

c8966@gatekeeper: cpp>build CppTest.bld
Compiling /home/c8966/ada/cpp/CppTest.ada because "CppTest.o" doesn't
exist
/home/c8966/ada/cpp/CppTest.ada: Error: line 83 col 10 LRM:B.1(26), No
compatible C++ type for System.Address_Target

Error: build failed
Build terminated


Thanks,

Ganesh



             reply	other threads:[~2004-12-01 21:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-01 21:11 Ganesh Ramasivan [this message]
2004-12-01 23:05 ` Calling C++ methods from Ada Luke A. Guest
2004-12-02  0:21   ` Jeff C r e e.m
2004-12-02 11:12   ` Brian May
2004-12-02 21:32     ` Luke A. Guest
2004-12-02 21:49       ` Adrien Plisson
2004-12-03  8:59       ` Martin Krischik
2004-12-03 13:55         ` Luke A. Guest
2004-12-03 13:58         ` Luke A. Guest
2004-12-04 10:09           ` Brian May
2004-12-03 14:06         ` Luke A. Guest
2004-12-04 13:22           ` Georg Bauhaus
2004-12-05  1:51             ` David Botton
2004-12-02  4:36 ` Brian May
replies disabled

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