Aureliano: You are correct. That is an effective workaround, but it will be a maintenance nightmare for large C++ libraries if you have to wrap every method.
There has to be a better way. - X On Mon, Nov 22, 2021 at 1:06 PM Aureliano Guedes <guedes.aureli...@gmail.com> wrote: > Clifton, I think the best solution is wrap with C and then use Raku's > NativeCall. > > Like this example > <https://github.com/hartenfels/21-Advent-2015/blob/master/cpp/cpptest-extern-c.cpp> > > #include <vector> > > extern "C" > { > std::vector<int>* intvec_new() { return new std::vector<int>(); } > void intvec_free(std::vector<int>* vec) { delete v; } > // etc. pp. > } > > > #!/usr/bin/env raku > use NativeCall; > > sub holler(Str) is native('cpptest-extern-c') { ... } > holler('Hello World'); > > > But I really don't know if it is the best strategy. > Actually, I really hope to see in some near future the NativeCall working > easy and well with C++ libs. > > > > On Mon, Nov 22, 2021 at 2:50 PM Clifton Wood <clifton.w...@gmail.com> > wrote: > >> Aureliano: >> >> How are you attempting to call xframe functions? >> >> On Mon, Nov 22, 2021 at 11:24 AM Aureliano Guedes < >> guedes.aureli...@gmail.com> wrote: >> >>> Hi Clifton Wood, >>> Here it is. >>> https://andrewshitov.com/2020/01/08/calling-cpp-and-fortran-functions-from-raku-using-the-nativecall-interface/ >>> >>> It was, by far, the best example I founded. >>> But as simple as it is, I fail to call functions from xframe >>> <https://github.com/xtensor-stack/xframe> to raku. >>> >>> You'll also find examples here >>> <https://perl6advent.wordpress.com/2015/12/21/day-21-nativecall-backs-and-beyond-c/> >>> which are quite old. >>> And practical implementation in this repo on github >>> <https://github.com/hartenfels/21-Advent-2015/tree/master/cpp>. >>> >>> >>> >>> >>> On Mon, Nov 22, 2021 at 11:49 AM Clifton Wood <clifton.w...@gmail.com> >>> wrote: >>> >>>> Aureliano, where was this example for C++? I'd love to take a look at >>>> it! >>>> >>>> Raku could really use a dose of Qt. >>>> >>>> On Mon, Nov 22, 2021 at 8:52 AM Salve J Nilsen <s...@pvv.org> wrote: >>>> >>>>> Piper H said: >>>>> >>>>> > Has Larry Wall joined the development team of raku? >>>>> >>>>> He's been part of it since the very beginning. He's also on this list, >>>>> chipping in now and then (last time was in June this year). >>>>> >>>>> >>>>> - Salve >>>>> >>>>> -- >>>>> #!/usr/bin/env perl >>>>> sub AUTOLOAD{$AUTOLOAD=~/.*::(\d+)/;seek(DATA,$1,0);print# Salve >>>>> Joshua Nilsen >>>>> getc DATA}$"="'};&{'";@_=unpack("C*",unpack("u*",':50,$'.# < >>>>> s...@foo.no> >>>>> '3!=0"59,6!`%%P\0!1)46%!F.Q`%01,`'."\n"));eval "&{'@_'}"; __END__ is >>>>> near! :) >>>>> >>>> >>> >>> -- >>> Aureliano Guedes >>> skype: aureliano.guedes >>> contato: (11) 94292-6110 >>> whatsapp +5511942926110 >>> >> > > -- > Aureliano Guedes > skype: aureliano.guedes > contato: (11) 94292-6110 > whatsapp +5511942926110 >