From thomas.baier at logicals.com  Tue Oct  7 09:29:43 2008
From: thomas.baier at logicals.com (Thomas Baier)
Date: Tue, 7 Oct 2008 09:29:43 +0200 
Subject: [Rd] LinkingTo on Windows
Message-ID: <405593F1A35DDD11B2B4000C29F5CF530344DE@exchange-server.ow.ks>

Dear List,

R packages may specify a "LinkingTo" attribute to specify dependencies to
the source code (mainly the header files) of other packages. 

Unfortunately, it is not possible to also have a reference to the generated
library (.dll on Windows) of the other package. So including a header file
from another package to call an (exported) function will just not help. 

I've tried to implement a workaround for my package rcom (depending on
exported functions from rscproxy) by "manually" setting the library when
linking, but unfortunately this does not work for me, when rscproxy gets
installed into a different library (not the default one). OK, I could set
the library path relative to the source drive and absolute for the standard
library, so the "R CMD check" on CRAN is passed, but I don't think this
would be a good solution. 

Of course, I could implement true dynamic binding by getting a handle to the
rscproxy.dll (which already has been loaded at the time of loading rcom) and
getting out procedure addresses, but I don't think this is a good (general
and portable) solution either. 

How can this issue be addressed? How can I solve the problem of linking to
another package's library (if possible by just using "LinkingTo")

Best regards,
Thomas Baier



[Rd] LinkingTo on Windows
Thomas Baier