[Rd] Finding windows DLLs

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jan 7 22:39:54 CET 2008


On Mon, 7 Jan 2008, Duncan Murdoch wrote:

> On 1/7/2008 3:06 PM, Oleg Sklyar wrote:
>> Should adding PREFIX/library/XML/libs to PATH before system32 solve the
>> issue as Windows relies on PATH when searching for libs as well?
>
> No, system32 is searched before the PATH.  See
>
> http://msdn2.microsoft.com/en-us/library/ms682586.aspx
>
> That page doesn't discuss Win9X, NT4, or Win2K; I don't recall for sure,
> but I suspect there were earlier changes to the search order as well.  R
> currently supports all of these, and 2.7 will continue to support Win2k
> or later.

For the record, here is what the search order was at the time of VC++6 
(1998):

1. The directory from which the application loaded.

2. The current directory.

3. Windows 95 and Windows 98: The Windows system directory. Use 
the GetSystemDirectory function to get the path of this directory.

Windows NT: The 32-bit Windows system directory. Use the 
GetSystemDirectory function to get the path of this directory. The name of 
this directory is SYSTEM32.

4. Windows NT: The 16-bit Windows system directory. There is no function 
that obtains the path of this directory, but it is searched. The name of 
this directory is SYSTEM.

5. The Windows directory. Use theGetWindowsDirectory function to get the 
path of this directory.

6. The directories that are listed in the PATH environment variable.

The differences have been what is meant by the 'system directories', and 
the position of the current directory.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list