Note that there are some explanatory texts on larger screens.

plurals
  1. POmultiple definition of `imp_ZTVN4Rcpp14not_compatibleE` on WindowsXP with RInside
    text
    copied!<p>The software I am talking of contains 5 files and compiles "perfectly fine" on <code>openSUSE 11.3</code> with <code>gcc-4.5.1</code>:</p> <p>The same software shows the following error on <code>Windows XP</code> with <code>Mingw (gcc-4.6.3)</code>.</p> <p><strong>UPDATE</strong></p> <p>The problem is discovered.</p> <p>The problem is w.r.t the R's function <code>parseEval</code>. There are two similar functions: <code>parseEval</code> and <code>parseEvalQ</code>. The former returns a value, and the other returns void.</p> <p>I have used <code>parseEval</code> in a C++ plus Qt project, and it works very fine on Linux, and throws the above shown error on Windows.</p> <p><strong>Here is the reproducible example:</strong></p> <p>demo.cpp</p> <pre><code>#include &lt;iostream&gt; #include &lt;RInside.h&gt; #include &lt;Rcpp.h&gt; RInside R (0, NULL); RInside &amp; qtToR (R); int main () { int numberOne = 1; int numberTwo = 2; qtToR ["numberOne"] = numberOne; qtToR ["numberTwo"] = numberTwo; R.parseEvalQ ("sum = numberOne + numberTwo;"); int returnValue = R.parseEval ("sum"); std :: cout &lt;&lt; "\n" &lt;&lt; returnValue &lt;&lt; "\n"; } </code></pre> <p>Corresponding .pro file:</p> <pre><code>TEMPLATE = app TARGET = DEPENDPATH += . SOURCES += demo.cpp INCLUDEPATH += . INCLUDEPATH += c:/R-2.15.1/include INCLUDEPATH += c:/R-2.15.1/library/Rcpp/include INCLUDEPATH += c:/R-2.15.1/library/RInside/include LIBS += -Lc:/R-2.15.1/bin/i386 -lR LIBS += -Lc:/R-2.15.1/library/Rcpp/libs/i386 -lRcpp LIBS += -Lc:/R-2.15.1/library/RInside/libs/i386 -lRInside # You'll keep pulling your hair if you miss this statement when you are on windows. CONFIG += console </code></pre> <p><img src="https://i.stack.imgur.com/XRBPP.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload