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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:1742:: with SMTP id 63-v6mr127825iox.120.1530677638799; Tue, 03 Jul 2018 21:13:58 -0700 (PDT) X-Received: by 2002:aca:c744:: with SMTP id x65-v6mr102187oif.2.1530677638629; Tue, 03 Jul 2018 21:13:58 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder4.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!d7-v6no1297153itj.0!news-out.google.com!z3-v6ni1373iti.0!nntp.google.com!u78-v6no1302849itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 3 Jul 2018 21:13:58 -0700 (PDT) In-Reply-To: <3199b658-cc7d-47be-bc4d-a8346c0d765a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=220.235.48.124; posting-account=d51RWwoAAADvR-x0zYAtT9z3CRxT1eXo NNTP-Posting-Host: 220.235.48.124 References: <85743ee2-7d33-4024-a497-73a8dae0f480@googlegroups.com> <3199b658-cc7d-47be-bc4d-a8346c0d765a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <78c71918-5d7b-4f65-a306-3b8e9065c4da@googlegroups.com> Subject: Re: Interface Ada string with C++ std::string From: Roger Injection-Date: Wed, 04 Jul 2018 04:13:58 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53559 Date: 2018-07-03T21:13:58-07:00 List-Id: On Wednesday, July 4, 2018 at 1:33:59 PM UTC+10, Roger wrote: > On Wednesday, July 4, 2018 at 2:56:15 AM UTC+10, Lucretia wrote: > > On Tuesday, 3 July 2018 13:59:56 UTC+1, Roger wrote: > > > I am need to interface an Ada procedure to a C++ function that takes = a std::string as an input parameter. > > > Can someone advise me how to do this? > >=20 > > See https://github.com/Lucretia/test_binding >=20 > Thanks for this, it looks promising. > I have cloned test_binding, built and run it and am now using it as a bas= is for my own situation. Having said that; it is true for one of my Macs but not the other. On the other linking fails with numerous errors which I have been unable to= fix: Undefined symbols for architecture x86_64: "std::__1::locale::use_facet(std::__1::locale::id&) const", referenced fr= om: std::__1::basic_ostream >& std::__1= ::endl >(std::__1::basic_ostream >&) in libtest_binding.a(b_base.o) std::__1::basic_ostream >& std::__1= ::__put_character_sequence >(std::__1::ba= sic_ostream >&, char const*, unsigned lon= g) in libtest_binding.a(b_base.o) std::__1::basic_ostream >& std::__1= ::endl >(std::__1::basic_ostream >&) in libtest_binding.a(b_derived1.o) etc.