SWIG RInside c++ interface error - no matching function for call to 'RInside::Proxy::Proxy()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SWIG RInside c++ interface error - no matching function for call to 'RInside::Proxy::Proxy()

Harika Parakala
Hello,

I am trying to run an Rinside C++ program using swig commands. I am trying to create a DLL file by embedding R in TCL using SWIG. I am getting the following issues . I am running this on windows command prompt and using swing-3.0.12.

C:\swigwin-3.0.12\Examples\r\Rinside>swig -c++ -tcl example.i
Rinside.h(69) : Warning 325: Nested class not currently supported (Proxy ignored)
Rinside.h(90) : Warning 503: Can't wrap 'operator []' unless renamed to a valid identifier.
C:\swigwin-3.0.12\Examples\r\Rinside>g++ -c rinside_sample0.cpp -I/Tcl/include -I/R/R-3.3.2/include/RInside/inst/include -I/R/R-3.3.2/include/Rcpp/include -I/R/R-3.3.2/include
C:\swigwin-3.0.12\Examples\r\Rinside>g++ -c rinside_sample0_wrap.cxx -I/Tcl/include -I/R/R-3.3.2/include/RInside/inst/include -I/R/R-3.3.2/include/Rcpp/include -I/R/R-3.3.2/include
rinside_sample0_wrap.cxx: In function 'int _wrap_RInside_parseEval__SWIG_1(ClientData, Tcl_Interp*, int, Tcl_Obj* const*)':
rinside_sample0_wrap.cxx:1906:18: error: no matching function for call to 'RInside::Proxy::Proxy()'
   RInside::Proxy result;
In file included from rinside_sample0_wrap.cxx:1700:0:
Rinside.h:61:6: note: candidate: RInside::Proxy::Proxy(SEXP)
      Proxy(SEXP xx): x(xx) { };
Rinside.h:61:6: note:   candidate expects 1 argument, 0 provided
Rinside.h:59:11: note: candidate: RInside::Proxy::Proxy(const RInside::Proxy&)
     class Proxy {
Rinside.h:59:11: note:   candidate expects 1 argument, 0 provided
rinside_sample0_wrap.cxx: In function 'int _wrap_RInside_parseEvalNT(ClientData, Tcl_Interp*, int, Tcl_Obj* const*)':
rinside_sample0_wrap.cxx:1984:18: error: no matching function for call to 'RInside::Proxy::Proxy()'
  RInside::Proxy result;
In file included from rinside_sample0_wrap.cxx:1700:0:
Rinside.h:61:6: note: candidate: RInside::Proxy::Proxy(SEXP)
      Proxy(SEXP xx): x(xx) { };
Rinside.h:61:6: note:   candidate expects 1 argument, 0 provided
Rinside.h:59:11: note: candidate: RInside::Proxy::Proxy(const RInside::Proxy&)
     class Proxy {
Rinside.h:59:11: note:   candidate expects 1 argument, 0 provided

Below is my nested class in Rinside.h File. How can I include the nested class in the interface file?? I am relatively new to swig

    class Proxy {
public:
    Proxy(SEXP xx): x(xx) { };

    template <typename T>
    operator T() {
        return ::Rcpp::as<T>(x);
    }
private:
    Rcpp::RObject x;
};

Thanks,
Harika

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Swig-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/swig-user