debonair
debonair

Reputation: 2593

C or fortran libraries fails to load in R

I have c and Fortran function libraries in linux with .so files. I am trying to load them in R session but is.loaded() returns a FALSE.

Here are the steps I am following:

  1. create .so file using "R CMD SHLIB test.f"
  2. start R session by R command.
  3. load .so file using "dyn.load("test.so")"

Now when I check the status using is.loaded("test.so"), it returns FALSE.

What i am missing here?

Upvotes: 0

Views: 150

Answers (1)

Joshua Ulrich
Joshua Ulrich

Reputation: 176648

Read ?is.loaded: "symbol: a character string giving a symbol name."

You're passing a shared library name, not the name of a symbol in that library (unless "test.so" contains a symbol also named "test.so").

Upvotes: 1

Related Questions