运行swig界面文件时出现以下警告 警告325:当前不支持嵌套类(忽略代理)。 我能够抑制警告。但是我需要计算警告325:当前不支持嵌套类(代理被忽略)
下面嵌套类是接口文件(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"
当执行接口文件。以下是警告
C:\swigwin-3.0.12\Examples\r\Rinside>swig -tcl -c++ example.i
Rinside.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.
我试图从Tcl的呼叫RInside。首先,我的C代码应该能够接受参数,通过传递这些参数来调用RInside,并打印RInside执行结果。
下面是我在Rinside.h文件中的嵌套类。 如何在接口文件中包含嵌套类? 我是比较新的痛饮
class Proxy {
public:
Proxy(SEXP xx): x(xx) { };
template <typename T>
operator T() {
return ::Rcpp::as<T>(x);
}
private:
Rcpp::RObject x;
};
可有一个人请我提供一个骨架或代码的某些部分。这将有利于我
我收到以下错误,而包装的CPP代码
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
向我们展示一个重现问题的最小完整示例界面。 – Flexo
编辑请帮忙 – Srin