R and Visual Studio

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

R and Visual Studio

lille stor
Hi,
 
I am trying to build R using Visual Studio 2010 but without success. My question is if it possible build R with this compiler anyway?
 
If not, could someone please tell how to link one's C code against both the static and shared libraries of R for Windows (that comes from the official website found here https://cran.r-project.org/mirrors.html)?
 
Thank you!

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: R and Visual Studio

Dirk Eddelbuettel

On 19 September 2017 at 12:53, lille stor wrote:
| I am trying to build R using Visual Studio 2010 but without success. My question is if it possible build R with this compiler anyway?

In general, no.

[ I believe there is an exception if you're a true compiler expert and really
know what you're doing. No such person is part of the wider R community as
far as I know. ]

| If not, could someone please tell how to link one's C code against both the static and shared libraries of R for Windows (that comes from the official website found here https://cran.r-project.org/mirrors.html)?

By reading the Fine Manuals that came with your version of R, in particular
'R Installation and Administration' and 'Writing R Extensions'.  You will
need to install Rtools which provides the compiler R uses on Windows.

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: R and Visual Studio

Dirk Eddelbuettel

On 19 September 2017 at 07:07, Dirk Eddelbuettel wrote:
| [ I believe there is an exception if you're a true compiler expert and really
| know what you're doing. No such person is part of the wider R community as
| far as I know. ]

This was missing an important qualifier for "with particular knowledge of
visual c/++ and windows".

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: R and Visual Studio

Prof Brian Ripley
In reply to this post by lille stor


> On 19 Sep 2017, at 11:53, lille stor <[hidden email]> wrote:
>
> Hi,
>
> I am trying to build R using Visual Studio 2010 but without success. My question is if it possible build R with this compiler anyway?

It has been done, in the distant past.  However, none of the attempts produced a build which could pass R's checks.
>
> If not, could someone please tell how to link one's C code against both the static and shared libraries of R for Windows (that comes from the official website found here https://cran.r-project.org/mirrors.html)?

It is not too difficult to make and load a DLL with VS and even link to R internals using an import library.  Details are in the manual or linked from there (section 5.5).  (There is no static library for R on Windows.)

>
> Thank you!
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel