[R] help for calling a c program in the windows version R
dmurdoch at pair.com
Fri May 23 05:00:35 CEST 2003
On Thu, 22 May 2003 13:33:07 -0400, you wrote:
>I want to call a c program in the windows version R, so I compiled it in VC to get the dll file and use the command dyn.load to call it in R. There is no error appeared for this command, but when I use the command is.loaded to check, it shows that dll file isnt be loaded. Does anyone have same experience or know the correct way to do it?
"is.loaded" doesn't check for the DLL, it checks for a particular
entry point in the DLL. Most likely VC is exporting the function
under a different name than you are searching for, or isn't exporting
it at all.
You can view all the exports in a DLL using the Quick View program
that is distributed with some versions of Windows, or using the
objdump program that's in the development tools put together by Brian
Ripley, or using some tool that probably comes with VC. (With Borland
compilers the tool is called tdump.exe, but I don't know what
Microsoft calls it.)
More help on using DLLs is on my web page,
in the readme.packages file distributed with R.
More information about the R-help