[Rd] QT + RInside problem complement
murdoch.duncan at gmail.com
Fri Jun 19 19:11:05 CEST 2015
On 19/06/2015 12:37 PM, PO SU wrote:
> The solution post is here:
> In the paragraph:
> I did need however to install Rcpp and RInside from source, and with the same
> compiler used to compile qtdensity (otherwise I would get additional linker
> errors). As I had trouble getting the (Cygwin-based) g++ shipped with Rtools
> to work with Qt, I used instead the g++ shipped with Qt SDK to compile Rcpp
> and RInside. To do that, I adjusted the PATH environment variable to point to
> QtSDK\mingw\bin instead of Rtools\gcc-4.6.3\bin.
> With the sentence:
> I used instead the g++ shipped with Qt SDK to compile Rcpp
> and RInside.
> I failed to do that, anyone know why? can MingW compile the Rcpp and Rinside ? I don't know if i explain my question clearly.
Part of that quoted paragraph is wrong: the g++ shipped with Rtools is
*not* Cygwin-based, though some of the other tools in Rtools are.
More to the point: it's likely that you need to use the same compiler
for everything, especially once you start using C++. There are many
assumptions (e.g. about name mangling, exceptions, etc.) that need to
match, and it's very hard to do that with two different compilers.
So if you are unable to compile what you need with the gcc 4.6.3 that's
in Rtools and want to use a different compiler, you might need to
recompile R and all packages and libraries that are involved with the
alternate compiler as well.
More information about the R-devel