Oliver
Oliver

Reputation: 39

Use R CMD SHLIB to generate data from a .c file

I want to create a .dll from a .c file that should generate some data for further data analysis with the following code. rsnmm.c is saved in the current working directory.

system("R CMD SHLIB rsnmm.c")

However this does not work and I get the following error message

    In system(cmd) : 'make' not found
[1] 1

What is the problem here?

Upvotes: 0

Views: 291

Answers (1)

tpetzoldt
tpetzoldt

Reputation: 5813

If you use Windows, install the R Tools and set the system path, see

https://cran.r-project.org/bin/windows/Rtools/

but if you use Linux, make also sure to have the compilers installed, see https://cran.r-project.org/bin/linux/ and select the instruction that matches your distribution.

Most Linuxes come with the compilers by default, except Ubuntu.

Upvotes: 2

Related Questions