compile/link RInside on windows

281 views
Skip to first unread message

pasp...@noos.fr

unread,
Feb 25, 2012, 12:51:32 PM2/25/12
to bru...@googlegroups.com
Hello

I find out your group and I am looking for experience exchange regarding the compilation/Link
of RInside&RCpp on a windows machine

I have tried to do it with no success both from netbeans and also CodeBlocks

have you succeeded in doing that with an IDE?

thanks in advance
pascal

Shekhar

unread,
Feb 27, 2012, 2:53:23 AM2/27/12
to Bangalore R Users - BRU
Hello,
I have done the integration on windows (not with an IDE) but i felt
its not worth spending so much of time. If you are integrating R in
your application from scratch, then its fine. But that was not the
case for me, so i didn't find it useful.

If you are planning to integrate R with your current application, then
using RCpp and Rinside would be time consuming and cumbersome.

(1) If you are using ICPC (Intel COmpiler), then RCPP wont work, since
it required gcc. On windows you will have to MinGW to do the same, but
then again it will cause linking problems.

(2) Moreover embedding R in your already existing application would
require too many code changes.

A best approach to integrate R with any application of your choice
written either in C++ or Java would be RServe package, which is like
client server communication. In this case you dont have to change
anything except to add header files which comes with RServe package
and your application will be connected to Rserve process, will send
the request to RServer which in turn will send to R environment and
results will be send backd again to your application.

Another advantage of using this package is, if in future you want your
application to scale out by using Hadoop or want to integrate with
Hive, or unixODBC driver, HBase, then you can very well integrate with
minimal effort, since you have already done the connection to R from
your application.

Regards,
Som Shekhar

Shekhar

unread,
Feb 27, 2012, 3:09:35 AM2/27/12
to Bangalore R Users - BRU
Hi,
You can see this post
http://groups.google.com/group/brumail/browse_thread/thread/60d514e6dab57836/30d71a0ab4e53c8f?hl=en_US&lnk=gst&q=Rserve#30d71a0ab4e53c8f,
for using RServe on CentOS.
i will post for windows today along with some sample programs.

Hope this helps.

Regards,
Som Shekhar

On Feb 27, 12:53 pm, Shekhar <shekhar2...@gmail.com> wrote:
> Hello,
> I have done the integration on windows (not with an IDE) but i felt
> its not worth spending so much of time. If you are integrating R in
> your application from scratch, then its fine. But that was not the
> case for me, so i didn't find it useful.
>
> If you are planning to integrate R with your current application, then
> using RCpp and Rinside would be time consuming and cumbersome.
>
> (1) If you are using ICPC (Intel COmpiler), then RCPP wont work, since
> it required gcc. On windows you will have to MinGW to do the same, but
> then again it will cause linking problems.
>
> (2) Moreover embedding R in your already existing application would
> require too many code changes.
>
> A best approach to integrate R with any application of your choice
> written either in C++ or Java would beRServepackage, which is like
> client server communication. In this case you dont have to change
> anything except to add header files which comes withRServepackage
> and your application will be connected toRserveprocess, will send

vinay hasyagar

unread,
Feb 27, 2012, 2:57:23 AM2/27/12
to bru...@googlegroups.com
Hello
I also had problem in installing RMySQL.
Neither I could compile nor I could get older versions of R with RMySQL.
But I read from this Bangalore user group mail - Building R from
Source On CentOS as follows.
Before building R, check whether the following packages are avaialable
on your system. The pre-requisite packages are as follows:

1. gcc
I am using 4.1.2 version .(gcc (GCC) 4.1.2 20080704 (Red Hat4.1.2-51))
2. Perl ( Mine is 5.8.8)
3. make (3.81)
4. autoconf (2.59) [yum install autoconf]
5.automake(1.9.6) [yum install automake]
6. g77 or f77 compiler (Fortran compiler)
7. yum install compat-gcc-34-g
However I have not tried this.
regards
vinay

Shekhar

unread,
Feb 27, 2012, 3:15:50 AM2/27/12
to Bangalore R Users - BRU
Hello Vinay,
Can you please elaborate what problems are you facing while compiling
R?

Regards,
Som Shekhar

On Feb 27, 12:57 pm, vinay hasyagar <vvhasya...@gmail.com> wrote:
> Hello
> I also had problem in installing RMySQL.
> Neither I could compile nor I could get older versions of R with RMySQL.
> But I read  from this Bangalore user group mail - Building R from
> Source On CentOS as follows.
> Before building R, check whether the following packages are avaialable
> on your system. The pre-requisite packages are as follows:
>
> 1. gcc
> I am using  4.1.2 version .(gcc (GCC) 4.1.2 20080704 (Red Hat4.1.2-51))
> 2. Perl ( Mine is 5.8.8)
> 3. make (3.81)
> 4. autoconf (2.59) [yum install autoconf]
> 5.automake(1.9.6) [yum install automake]
> 6. g77 or f77 compiler (Fortran compiler)
> 7. yum install compat-gcc-34-g
> However I have  not  tried this.
> regards
> vinay
>

vinay hasyagar

unread,
Feb 28, 2012, 10:24:44 AM2/28/12
to bru...@googlegroups.com
28th Feb, 2012
Sir,
It is very nice of you to coming forward to help me.
I am sorry my reply was late.
I was working on windows 7 OS.
I had R studio version 2.13.2
Binary files for R MySQL were not available.
I could get only source files  of RMYSQL for RStudio  version of 2.13
I downloaded the RMySQL file, unzipped the file and placed the files at directory
C:\program files\R\R-2.13.2\library\RMySQL, but no use.
I also tried install RMySQL from RStudio, no use.
Of course I had no compiling facilities for any language on my computer.
I realize that what I have is RMySQL source files and not binary files.
I request you to kindly provide me a set of files which included R studio and corresponding
RMySQL in binary form of any version or link or instructions as to how to compile RMySQL in my system.
I converted mysql files into csv files and I got required outputs.
I worked as a C  developer on Unix and I am  not very familiar with windows compiling facilities. I have used turbo C/C++  and . I have compiled COBOL files some time back.
Right now I am not into R programming, but I want to know how to go about connecting RMySQL from R studio.
with regards
vinay

vinit....@gmail.com

unread,
Mar 1, 2012, 12:39:49 AM3/1/12
to bru...@googlegroups.com
I'm being the possibility of having RMySQL binaries downloadable just as before. Som et al., what would you need to cause that? Am willing to fund that BRU project.

Regards,
Vinit
Sent from BlackBerry® on Airtel

From: vinay hasyagar <vvhas...@gmail.com>
Date: Tue, 28 Feb 2012 20:54:44 +0530
Subject: Re: compile/link RInside on windows
Reply all
Reply to author
Forward
0 new messages