[Rcpp-devel] how to create an Rcpp::List in a standalone C++ application?
florian.oswald at gmail.com
Wed Dec 18 12:12:30 CET 2013
I have a C++ class that I build and test without the help of Rcpp.
I use Rcpp as an interface, inputting and outputting data from and to the
class. I'm stuck at the outputter. Ideally I would like to have this at the
end of my program:
Rcpp::List Results = MyClass.ExportToR();
where ExportToR is a method that creates an Rcpp::List from members of
MyClass. However, I'm unable to use components of Rcpp.h in my code; In
particular, I'm unable to make this toy example work:
using namespace std;
int main(int argc, char *argv)
// Rcpp::List L; want to use
// L to output results to R.
I compile it with
llvm-g++-4.2 -arch x86_64
-I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -W
-lRcpp -lR -o export
which compiles, but produces a segfault.
Thanks for any help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel