none
Compiling Rccp with VS using RTVS

    Question

  • Hello,

    In our software development team, we have some libraries written in C that we’d like to be able to link to and call in R.

    As you most certainly already know using Visual Studio toolchain for this task is currently not possible as the VS C++ compiler is not compatible with Rtool and Rcpp.

    My question then is: Will this be possible with the upcoming VS-based IDE (akin to RStudio) R Tools for Visual Studio ? I.e. will RTVS allow us to compile Rcpp in VS?

    If yes, when do you expect this to be available?

    Thank you for your help!

    Monday, April 11, 2016 9:03 AM

Answers

  • Hi CrelJo,

    >> Will this be possible with the upcoming VS-based IDE (akin to RStudio) R Tools for Visual Studio ? I.e. will RTVS allow us to compile Rcpp in VS?

    According to the description for R tools for Visual Studio, it is should be a extension for Visual Studio that used to develop R language programs. So I think the C++ compiler also support the R language.

    https://blogs.technet.microsoft.com/machinelearning/2016/03/09/announcing-r-tools-for-visual-studio-2/

    And in my opinion, if the language is supported by Visual Studio, the C++ compiler can compile this type of dlls. For example, Visual Studio is support C#, we can call C# libraries from C++ project and compile it successful. Because the compiler will compile these libraries to Intermediate language (IL) which will be recognized by Visual Studio.

    If possible, please provide a sample RCpp file and I will verify your problem in my side, since I don't familiar with R language. Thanks for your understanding.

    Best Regards,
    Weiwei

    Tuesday, April 12, 2016 7:11 AM
    Moderator

All replies

  • Hi CrelJo,

    >> Will this be possible with the upcoming VS-based IDE (akin to RStudio) R Tools for Visual Studio ? I.e. will RTVS allow us to compile Rcpp in VS?

    According to the description for R tools for Visual Studio, it is should be a extension for Visual Studio that used to develop R language programs. So I think the C++ compiler also support the R language.

    https://blogs.technet.microsoft.com/machinelearning/2016/03/09/announcing-r-tools-for-visual-studio-2/

    And in my opinion, if the language is supported by Visual Studio, the C++ compiler can compile this type of dlls. For example, Visual Studio is support C#, we can call C# libraries from C++ project and compile it successful. Because the compiler will compile these libraries to Intermediate language (IL) which will be recognized by Visual Studio.

    If possible, please provide a sample RCpp file and I will verify your problem in my side, since I don't familiar with R language. Thanks for your understanding.

    Best Regards,
    Weiwei

    Tuesday, April 12, 2016 7:11 AM
    Moderator
  • Hello,

    Can we compile Rcpp and RInside in VS2017 now that we have support for R using RTVS?

    Thanks for your help

    Tuesday, April 11, 2017 8:42 PM