0

I have a library, let's say mylibrary.dll, that has c++ code that I want to run in R. I did this:

dyn.load("mylibrary.dll")
.Call("myfun")

I get:

Error in .Call("myfun") : C symbol name "myfun" not in load table

Now, I've seen several answers to similar problems, on here and on other websites, but when I attempted each solution, each seemed to be to require having access to the original source code, for example adding something like this: extern "C" to the C++ code or re-compiling the code in a certain way. All I have is a .dll file, and I'd like to use that directly to call from R the functions contained within it.

Eric Brooks
  • 657
  • 5
  • 13

1 Answers1

0

Solution: the name of the function was different than what I expected. I went to the thread that Alexey suggested in the comments, and from there was able to use one of the suggested tools (DLL export viewer) to get a list of the functions, where I found the correct name.

(Alas, I now need to figure out why R is locking up when I call the function, but my question here is done!)

Eric Brooks
  • 657
  • 5
  • 13