From ripley at stats.ox.ac.uk  Wed Aug 29 14:35:42 2012
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 29 Aug 2012 13:35:42 +0100
Subject: [Rd] include dll in R-package
In-Reply-To: <3B9705D0-FA3E-4DE8-863C-A7BD1AFCD4C4@xs4all.nl>
References: <159640230.4428504.1346211096341.JavaMail.root@psu.edu>
	<3B9705D0-FA3E-4DE8-863C-A7BD1AFCD4C4@xs4all.nl>
Message-ID: <503E0C9E.1050502@stats.ox.ac.uk>

On 29/08/2012 12:19, Berend Hasselman wrote:
>
> On 29-08-2012, at 05:31, LIYING HUANG wrote:
>
>>
>>
>> Thanks a lot for those examples, is there any example with Fortran
>> source codes which could depend on an external Fortran DLL?
>>
>
> I wouldn't know.
>
> Berend

What does 'depend on' mean here?  (All the context has been removed, 
pace the posting guide.)

If it means 'link to', then any package which uses BLAS or LAPACK is an 
example.  But strictly you cannot link to a DLL (although you can on 
Windows, but on OS X what R calls DLL is not what OS X calls a 'dynamic 
library').

If you want to dynamically load an external DLL then

- there are no Fortran examples on CRAN
- you need to ensure that the DLL is already linked to the Fortran 
runtime (which typically Fortran DLLs are not).

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



[Rd] include dll in R-package
Prof Brian Ripley