How to create a binary executable file from a .cpp file in window PC?

Using MAC computer, I created a file called “” by typing the following command in RStudio Terminal:

R CMD SHLIB task.cpp

My R code calls this "" file. However, the “” file seems to work only in MAC computer but not in Window PC. How could I create a similar binary executable file that functions like file “” that can run in Window PR Rstudio?

Do you have a C++ toolchain (make, compiler, linker) installed?

The SHLIB depends on the compiler installed to the system to build libraries.

Try Rtools

It appears to be a one stop shop for the tools required to build shared libraries or R itself from source.

I have downloaded Rtools in window. I have no experience in Rtools. How to use it to create a binary executable file so that RStudio can run it?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.