[Rcpp-devel] Problem embedding R in Qt C++ application on Win32
Dirk Eddelbuettel
edd at debian.org
Sun Mar 30 17:46:13 CEST 2014
On 30 March 2014 at 10:02, Dirk Eddelbuettel wrote:
|
| On 30 March 2014 at 16:45, Minh-Nhut Huynh wrote:
| | But the problem occurs when I try to deploy it on my win32 machine.
|
| I don't work much on Windows, but I have used this repeatedly with different
| Qt releases. You should make sure you build __everything__ with the same
| compiler though: Qt, R, Rcpp, RInside, ...
|
| The first time I did this Qt didn't yet ship as MinGW builds so I started
| from source. They do have the appropriate configuration options. If you'd
| rather not rebuild Qt, you may have to rebuild R though you may get away with
| the prebuild version as C interfaces are a little more tolerant. You think
| you almost certainly have to have Qt and Rcpp / RInside on the very same
| compiler build.
|
| In short, get your toolchain ducks in a row and it will work. But as almost
| always, it is way more painful to get these things sorted on that platform.
Gosh -- I replied to the OP who spammed Romain and me at home as well as
the list ___without being subscribed to the list___ so it never made it.
Context below.
Minh-Nhut: Please subscribe, and use the list without CCing us. Thanks.
Dirk
From: Minh-Nhut Huynh <minutestatistique160 at gmail.com>
To: edd at debian.org, romain at r-enthusiasts.com,
rcpp-devel at lists.r-forge.r-project.org
Subject: Problem embedding R in Qt C++ application on Win32
Date: Sun, 30 Mar 2014 16:45:27 +0200
Hi,
First of all, I want to thank you for all your great works on Integrating R
with C++ (Rcpp, RInside, etc).
They are very useful to me. Indeed, thank to RInside, Rcpp and the examples
from the packages, I managed to call R from my Qt C++ application. It compiles
and works very well on my 64-bit debian squeeze machine.
But the problem occurs when I try to deploy it on my win32 machine.
I also use Qt (version 5.2.1 mingw4.8 openGL) and get this error while
debugging :
int main(int argc, char *argv[]) {
>>>> RInside R(argc, argv); // create an embedded R instance
Signal : SIGSEGV (Segmentation fault)
(code continues)...
}
when I try to print my argument variables' value, it shows :
R : @0x28fe8c
argc : 1
argv : 1 element :
argv[0] : "C:\Users\Maison\Desktop\Minh\R_embedding_win32\src\helloworld\gnu32\debug\helloworld_debug.exe"
Why is it working on linux (where argv[0] yields "./unix/debug/helloworld_debug") and not on windows ?
Thank you in advance,
Looking forward to hearing from you,
Best reagrds,
Minh-Nhut HUYNH
A statistician / C++ developper from Paris, France
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list