You need to setup a Makevars.win and at lest modify
 PKG_LIBS
and probably
 PKG_FFLAGS
 PKG_CFLAGS
depending on how you link to the DLL.

I suggest downloading example packages from Bioc / CRAN to look at.

Kasper

On Fri, Aug 24, 2012 at 9:06 AM, LIYING HUANG <lx...@psu.edu> wrote:

>
> Hi,
>
> We have several projects in the center done by researchers over years
> in Fortran, there are copy right issues etc to prevent us from
> giving away the source codes, but a lot of social scientist are
> interested to use the program. We tried to use dlls to make plugins
> (available in our website) in various statistics platforms
> (SAS, STATA and R) to make it available to general public.
>
> We used to be able to build R package using dll on version R-2.7.0,
> , but failed to build with newer R version with the same source.
> Any help is greatly appreciated.
>
> When I try to build R package for newer version of R, I could build
> to get "lcca_1.0.0.tar.gz", but when I "R CMD check lcca_1.0.0.tar.gz",
> I got error message as:
>
> * using log directory 'D:/project/LCCA/lcca.Rcheck'
> * using R version 2.15.1 (2012-06-22)
> * using platform: i386-pc-mingw32 (32-bit)
> * using session charset: ISO8859-1
> * checking for file 'lcca/DESCRIPTION' ... OK
> * checking extension type ... Package
> * this is package 'lcca' version '1.0.0'
> * checking package namespace information ... OK
> * checking package dependencies ... OK
> * checking if this is a source package ... OK
> * checking if there is a namespace ... OK
> * checking for executable files ... WARNING
> Found the following executable file(s):
>   libs/lcca.dll
> Source packages should not contain undeclared executable files.
> See section 'Package structure' in the 'Writing R Extensions' manual.
> * checking whether package 'lcca' can be installed ... ERROR
> Installation failed.
> See 'D:/project/LCCA/lcca.Rcheck/00install.out' for details.
>
> and the message in 00install.out is:
>
> * installing *source* package 'lcca' ...
> ** R
> ** data
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** testing if installed package can be loaded
> Error in library.dynam(lib, package, package.lib) :
>   DLL 'lcca' not found: maybe not installed for this architecture?
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing 'D:/project/LCCA/lcca.Rcheck/lcca'
>
>
> Thanks a lot!
> Liy
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to