[Rd] Finding windows DLLs
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Jan 7 22:35:28 CET 2008
On Mon, 7 Jan 2008, 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?
The Windows code for package XML says
> XML:::.onLoad
function (libname, pkgname)
{
if (.Platform$OS.type == "windows") {
temp <- Sys.getenv("PATH")
Sys.setenv(PATH = paste(utils::normalizePath(file.path(libname,
pkgname, "libs")), temp, sep = ";"))
on.exit(Sys.setenv(PATH = temp))
}
library.dynam("XML", pkgname, libname)
if (exists("setMethod")) {
}
.C("RSXML_setErrorHandlers")
}
<environment: namespace:XML>
so it does already do that.
The order depends on the version of Windows *and* its settings: see
http://msdn2.microsoft.com/en-us/library/ms682586(VS.85).aspx
There is a way to change this:
http://msdn2.microsoft.com/en-us/library/ms686203(VS.85).aspx
but it would preclude Windows 2000.
Perhaps Martin can explain how libxml2.dll got into c:/WINDOWS/system32/?
My suggestion is that we rename the DLL when copied into library/XML/libs
to something like libRxml2.dll.
>
> Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466
>
>
> Martin Morgan wrote:
>> The XML package relies on libxml2.dll (e.g., bundled with the CRAN
>> binary) installed in library/XML/libs. Unfortunately,
>> c:/WINDOWS/system32/libxml2.dll will be found and loaded before
>> this.
>>
>> Is there any programatic solution?
>>
>> Thanks,
>>
>> Martin
--
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