在Eclipse中运行RInside示例时出错

时间:2019-07-02 19:20:26

标签: r eclipse rinside

问候,

我正在尝试在Eclipse中运行RInside示例,但出现此错误

./rinside_sample0.o: In function `main':
D:\omnetpp-5.1\samples3\myRapp\Debug/../rinside_sample0.cpp:16: undefined reference to `RInside::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
D:\omnetpp-5.1\samples3\myRapp\Debug/../rinside_sample0.cpp:18: undefined reference to `RInside::parseEvalQ(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:46: myRapp.exe] Error 1

这是rinside_sample0的代码:

#include <RInside.h>                    // for the embedded R via RInside

int main(int argc, char *argv[]) {

    RInside R(argc, argv);              // create an embedded R instance

    R["txt"] = "Hello, world!\n";   // assign a char* (string) to 'txt'

    R.parseEvalQ("cat(txt)");           // eval the init string, ignoring any returns

    exit(0);
}

我在eclipse中添加了以下配置: enter image description here enter image description here

任何帮助您解决该问题的帮助将不胜感激

0 个答案:

没有答案