From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8f1dd1c22d4d88cc,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-07 10:55:52 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Szymon Guz Newsgroups: comp.lang.ada Subject: import errors Date: Sun, 07 Mar 2004 19:55:57 +0100 Organization: tp.internet - http://www.tpi.pl/ Message-ID: NNTP-Posting-Host: hal.skynet.org.pl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: nemesis.news.tpi.pl 1078685878 332 195.116.185.50 (7 Mar 2004 18:57:58 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Sun, 7 Mar 2004 18:57:58 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:6123 Date: 2004-03-07T19:55:57+01:00 List-Id: Hi, I'm trying to make a binding to a dll library written in C++ and I'va got a problem. I have two types in one package and two procedures that are named the same: type A; type B is new A; procedure A(this:A_Access); procedure A(this:B_Access); and now I want to import them from the dll library, but writing sth like this: pragma Import(C,A,"AAA"); pragma Import(C,A,"BBB"); generates some compiler errors, so I tried to do it in this way: the body of the procedures looks like this: procedure A(this:A_Access) is procedure THIS_A(this:A_Access); pragma Import(C,THIS_A,"AAA"); begin THIS_A(this); end; procedure A(this:B_Access) is procedure THIS_A(this:B_Access); pragma Import(C,THIS_A,"BBB"); begin THIS_A(this); end; I thought that it should work fine, but now I see that there is a compiler error which I don't undestand: undefined reference to 'AAA' So i've got two questions: what do I do wrong that I cannot import the functions in the *.adb file and I can in the *.ads file ? how can I import the functions ?