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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.11.81 with SMTP id v78mr14856864ioi.32.1523132729972; Sat, 07 Apr 2018 13:25:29 -0700 (PDT) X-Received: by 2002:a9d:6217:: with SMTP id g23-v6mr1684505otj.11.1523132729813; Sat, 07 Apr 2018 13:25:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer02.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!k65-v6no960320ita.0!news-out.google.com!15-v6ni419itg.0!nntp.google.com!u184-v6no972113ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 7 Apr 2018 13:25:29 -0700 (PDT) In-Reply-To: <959c633f-237d-47ea-88ff-4ad29faeb6c7@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.218.250; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.218.250 References: <959c633f-237d-47ea-88ff-4ad29faeb6c7@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <63a87d7f-0ad2-438c-a8b9-3d57b7189674@googlegroups.com> Subject: Re: Linking Ada to C++ Overloaded Functions and Methods From: Jere Injection-Date: Sat, 07 Apr 2018 20:25:29 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2335 X-Received-Body-CRC: 3987860273 Xref: reader02.eternal-september.org comp.lang.ada:51391 Date: 2018-04-07T13:25:29-07:00 List-Id: On Saturday, April 7, 2018 at 4:07:38 PM UTC-4, Ron Wills wrote: > On Saturday, April 7, 2018 at 1:05:24 PM UTC-6, Niklas Holsti wrote: > > > > I would try to change the pragma Imports into aspects, something like this: > > > > procedure draw_box (....) > > with Import, > > Convention => CPP, > > Link_Name => "_ZNK9Fl_Widget8draw_boxE10Fl_Boxtypej"; > > That worked perfectly! Thanks! > One gotcha that you may already be aware of, but just bit me today is that if you have overloaded functions in a base class, but don't override all of them in an extension class, you will get "undefined" errors when calling the versions that are not overridden. See: https://stackoverflow.com/questions/1628768/why-does-an-overridden-function-in-the-derived-class-hide-other-overloads-of-the I was trying out Niklas' suggestion in my ada/cpp scratch space and had it happen because I extended the ada tagged type and didn't override all of the imports.