FairyOnIce
FairyOnIce

Reputation: 2614

How to do "R CMD SHLIB" multiple .c and .f files

I have .c files and .f files which are interdependent. That means, the function used in .c files are defined in .f files.

Now, I want to call for some functions in .c file from my R. How can I do this using R CMD SHLIB?

Upvotes: 2

Views: 907

Answers (1)

FairyOnIce
FairyOnIce

Reputation: 2614

Oh, I figured out this can be easily done by

  R CMD SHLIB code1.f  code2.c -o myLib

Then in R, I can call the myLib via

  dyn.load("myLib")

Upvotes: 3

Related Questions