Re: [Rd] Telling Windows how to find DLL's from R?

From: Dominick Samperi <djsamperi_at_gmail.com>
Date: Fri, 09 Jul 2010 18:10:44 -0400

On Fri, Jul 9, 2010 at 3:48 PM, Duncan Murdoch <murdoch.duncan_at_gmail.com>wrote:

> On 09/07/2010 2:38 PM, Dominick Samperi wrote:
>
>> Is it possible to set Windows' search path from within R, or
>> to tell Windows how to find a DLL in some other way from
>> R? Specifically, if a package DLL depends on another DLL
>> the normal requirement is that the second DLL be in the
>> search path so Windows can find it (there are other tricks,
>> but they apply at the Windows level, not at the R level).
>>
>>
>
>
> I haven't tried this, but can't you use Sys.setenv() to change the PATH to
> what you want? Presumably you'll want to change it back afterwards.
>

Thanks, good suggestion, but it does not seem to work. If PATH is updated in this way the
change is local to the current process, not to the top-level Windows process, so a subsequent
dyn.load('foo.dll') will fail if foo.dll depends on bar.dll, unless bar.dll is placed in the search
path for the top-level shell. Seems like this needs to be done as part of system

startup outside of R.

On the other hand, if foo.dll is the package library for package foo, and if foo
depends on package bar, then there is no need to place bar.dll in the top-level
search path. R takes care of this (more typical) situation.

Dominick

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 09 Jul 2010 - 22:14:51 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 10 Jul 2010 - 12:30:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive