Srinivas Sandupatla
2017-03-21 22:51:31 UTC
Hello,
I am getting the following Warning while running the swig interface file
Warning 325: Nested class not currently supported (Proxy ignored). *I was
able to suppress the warning*. But I need the nested class for computation
Below is the Interface file(example.i)
%module example%{#include "Rinside.h"#include
"Rinsidecommon.h"#include "Callbacks.h"%}/* Let's just grab the
original header file here */%include "Rinside.h"%include
"Rinsidecommon.h"%include "Callbacks.h"
While executing the interface file. The following are the warnings
C:\swigwin-3.0.12\Examples\r\Rinside>swig -tcl -c++
example.iRinside.h(70) : Warning 325: Nested class not currently
supported (Proxy ignored)Rinside.h(91) : Warning 503: Can't wrap
'operator []' unless renamed to a valid identifier.
*I am trying to calling RInside from Tcl. First, my C code should be able
to take arguments, call RInside by passing those arguments, and print the
results of RInside execution*.
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;};
Can some one please provide me a skeleton or some part of the code. It will
be helpful for me
I am getting the following errors while wrapping the cpp code
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()'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
Below is a different question
When I am trying to create a ,dll file. Even if I include libRinside. I am
still getting the following error
C:\swigwin-3.0.12\Examples\r\Rinside>g++ -shared rinside_sample0.o
rinside_sample0_wrap.o -o example.dll -L/Tcl/lib
-L/R/R-3.3.2/library/RInside/libs/i386 -L/R/R-3.3.2/bin/i386 -ltcl86
-llibRInside -lR
rinside_sample0.o:rinside_sample0.cpp:(.text+0x102): undefined reference to
`RInside::operator[](std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0.o:rinside_sample0.cpp:(.text+0x16c): undefined reference to
`RInside::parseEvalQ(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x271c): undefined
reference to `RInside::parseEval(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, SEXPREC*&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x28d4): undefined
reference to `RInside::parseEvalQ(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x2a6d): undefined
reference to `RInside::parseEvalQNT(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x2c1f): undefined
reference to `RInside::parseEval(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x30c7): undefined
reference to `RInside::parseEvalNT(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
collect2.exe: error: ld returned 1 exit status
Can some one please help me on this
Thanks
Srinivas
I am getting the following Warning while running the swig interface file
Warning 325: Nested class not currently supported (Proxy ignored). *I was
able to suppress the warning*. But I need the nested class for computation
Below is the Interface file(example.i)
%module example%{#include "Rinside.h"#include
"Rinsidecommon.h"#include "Callbacks.h"%}/* Let's just grab the
original header file here */%include "Rinside.h"%include
"Rinsidecommon.h"%include "Callbacks.h"
While executing the interface file. The following are the warnings
C:\swigwin-3.0.12\Examples\r\Rinside>swig -tcl -c++
example.iRinside.h(70) : Warning 325: Nested class not currently
supported (Proxy ignored)Rinside.h(91) : Warning 503: Can't wrap
'operator []' unless renamed to a valid identifier.
*I am trying to calling RInside from Tcl. First, my C code should be able
to take arguments, call RInside by passing those arguments, and print the
results of RInside execution*.
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;};
Can some one please provide me a skeleton or some part of the code. It will
be helpful for me
I am getting the following errors while wrapping the cpp code
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()'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
Below is a different question
When I am trying to create a ,dll file. Even if I include libRinside. I am
still getting the following error
C:\swigwin-3.0.12\Examples\r\Rinside>g++ -shared rinside_sample0.o
rinside_sample0_wrap.o -o example.dll -L/Tcl/lib
-L/R/R-3.3.2/library/RInside/libs/i386 -L/R/R-3.3.2/bin/i386 -ltcl86
-llibRInside -lR
rinside_sample0.o:rinside_sample0.cpp:(.text+0x102): undefined reference to
`RInside::operator[](std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0.o:rinside_sample0.cpp:(.text+0x16c): undefined reference to
`RInside::parseEvalQ(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x271c): undefined
reference to `RInside::parseEval(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, SEXPREC*&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x28d4): undefined
reference to `RInside::parseEvalQ(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x2a6d): undefined
reference to `RInside::parseEvalQNT(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x2c1f): undefined
reference to `RInside::parseEval(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
rinside_sample0_wrap.o:rinside_sample0_wrap.cxx:(.text+0x30c7): undefined
reference to `RInside::parseEvalNT(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
collect2.exe: error: ld returned 1 exit status
Can some one please help me on this
Thanks
Srinivas