[Rd] SHLIB steps on a Makefile

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Dec 22 21:35:54 CET 2007


On Sat, 22 Dec 2007, Hin-Tak Leung wrote:

> Hmm, I don't think you need a whole Makefile - while it is a
> bit complicated to set locations, etc, essentially if your C code
> needs an extra DLL (well, you'll have to bundle it with your package,
> etc because the otherwise link-loader won't find it), it is mostly
> just in Makevars.win
>
> PGK_LDGLAGS=-lotherlib
>
> 'compiling against a DLL in a another package' is alright, but resolving
> the DLL at runtime won't be trivial (unless you set explicit dependency
> of your package against this other one) ; so you might be better off
> compiling against a static build of the other with yours.

There is an interface to ensure that happens: details in 'Writing R 
Extensions'.  The 'live' example is lme4 'LinkingTo' on Matrix and stats.


> Iago Mosqueira wrote:
> <snipped>
>> Many thanks for the information. I am trying to make a package C code
>> compile against a DLL already present in another package, so I need to
>> include its location in the call to gcc.  I'll see what the most
>> portable system could be and will test widely.
>>
>> Regards,
>>
>>
>> Iago Mosqueira
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
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