Re: how to use std/std_unordered_map.i
William S Fulton <[email protected]> Mon, 19 Sep 2022 17:43:40 +0100
| Newsgroups | gmane.comp.programming.swig |
|---|---|
| Message-ID | <CANGqftB_v_NWEzzD2rWDQzx2rX0nYbX0Y171ONOrkC-D-ZeAXQ@mail.gmail.com> |
The files in Lib/std are common support implementations used by the more advanced STL wrappers. I'm afraid Perl is not one of those. What is required is a new file Lib/perl/std_unordered_map.i. This would be a copy of Lib/perl/std_map.i and modifications to turn it into a std::unordered_map.i. Probably not too hard to do. William On Fri, 16 Sept 2022 at 02:56, Duce, Richard via Swig-user < [email protected]> wrote: > [AMD Official Use Only - General] > > Hi everyone, > I posted an earlier question and wanted to attach this to that, but can > not figure out how to do it. > > > > I am a new swig user. > > My case is for c++ connecting to perl. > > > > I had an example working fine but only using std::string and > std_vector to connect back from c++ to perl. > > That worked fine, but I then wanted to use std_unordered_map ( I am > now using swig version 4.0.2 ) > > When I have %include <std_unordered_map.i> > in my .i file I got an error message saying std_unordered_map.i > not found, > although I can see it in share/swig/4.0.2/std > > > > So my general question is… how do I include that file from the std > directory ? > > It seems like my earlier guess at attempting to use -I > /path/to/swigInstall/share/swig/4.0.2/std > > does not work, because if I use that in the cmd line …. Like. > > swig -c++ -perl -I/path/to/swigInstall/share/swig/4.0.2/std myFile.i > > > > I can not compile the resulting wrap file successfully.. (even if I remove > all the std_unordered_map stuff leaving only stuff that previously > worked) > > > > So… how do I get access to the .i files in share/swig/4.0.2/std > > > > Ok.. thanks for any info > > Richard Duce > > > > > _______________________________________________ > Swig-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/swig-user > _______________________________________________ Swig-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/swig-user