[Rd] useDynLib in older versions e.g. (2.10)

Uwe Ligges ligges at statistik.tu-dortmund.de
Thu Apr 21 11:12:19 CEST 2011



On 20.04.2011 13:30, Tobias Abenius wrote:
> Hi,
>
> Has something changed regarding the useDynLib in the NAMESPACE file in
> packages? I've written a package that works in e.g. 2.12/2.13 but simply
> cannot find the dynamic library under windows. The version on CRAN is
> older than the one I'm talking about and depends on a newer version of R
> but I want to make the package available to people with older versions.
>
>  > utils:::menuInstallLocal()
> package 'lassoshooting' successfully unpacked and MD5 sums checked
>  > require(lassoshooting)
> Loading required package: lassoshooting
> Error in library.dynam(lib, package, package.lib) :
> shared library 'lassoshooting' not found
> In addition: Warning message:
> package 'lassoshooting' was built under R version 2.13.0


Yes, your package was built doe R-2.13.0 but you are using R <= 2.12.0 
where the dll files were located in a different directory.
Hence a) time to upgrade your R version or b) Install the package from 
sources yourself for the (unstated) version of R on your Windows machine.

Uwe Ligges


> I'm usually under linux and don't know about the gory details of .dll
> files.
>
> NAMESPACE file
> --------------
> useDynLib(lassoshooting)
> export(lassoshooting)
>
> happy easter!
>
> regards, Tobias
>
>
> 00install.out
>
>
> * installing *source* package 'lassoshooting' ...
> ** libs
>
> *** arch - i386
> gcc -I"D:/RCompile/recent/R-2.13.0/include"     -I"d:/Rcompile/CRANpkg/extralibs/local/include"     -O3 -Wall  -std=gnu99 -c ccd_common.c -o ccd_common.o
> ccd_common.c: In function 'ccd_common':
> ccd_common.c:118:2: warning: #warning Using R fortran BLAS calls
> gcc -I"D:/RCompile/recent/R-2.13.0/include"     -I"d:/Rcompile/CRANpkg/extralibs/local/include"     -O3 -Wall  -std=gnu99 -c ccd_r.c -o ccd_r.o
> ccd_r.c: In function 'ccd':
> ccd_r.c:163:5: warning: too many arguments for format
> ccd_r.c:156:7: warning: unused variable 'ret'
> ccd_r.c:18:11: warning: 'X' may be used uninitialized in this function
> ccd_r.c:18:14: warning: 'y' may be used uninitialized in this function
> gcc -shared -s -static-libgcc -o lassoshooting.dll tmp.def ccd_common.o ccd_r.o -Ld:/Rcompile/CRANpkg/extralibs/local/lib -LD:/RCompile/recent/R-2.13.0/bin/i386 -lRblas -lgfortran -LD:/RCompile/recent/R-2.13.0/bin/i386 -lR
> installing to d:/RCompile/CRANguest/R-release/lib/lassoshooting/libs/i386
>
> *** arch - x64
> x86_64-w64-mingw32-gcc -I"D:/RCompile/recent/R-2.13.0/include"     -I"d:/Rcompile/CRANpkg/extralibs64new/local/include"     -O2 -Wall  -std=gnu99 -c ccd_common.c -o ccd_common.o
> ccd_common.c: In function 'ccd_common':
> ccd_common.c:118:2: warning: #warning Using R fortran BLAS calls
> x86_64-w64-mingw32-gcc -I"D:/RCompile/recent/R-2.13.0/include"     -I"d:/Rcompile/CRANpkg/extralibs64new/local/include"     -O2 -Wall  -std=gnu99 -c ccd_r.c -o ccd_r.o
> ccd_r.c: In function 'ccd':
> ccd_r.c:163:5: warning: too many arguments for format
> ccd_r.c:156:7: warning: unused variable 'ret'
> ccd_r.c:18:11: warning: 'X' may be used uninitialized in this function
> ccd_r.c:18:14: warning: 'y' may be used uninitialized in this function
> x86_64-w64-mingw32-gcc -shared -s -static-libgcc -o lassoshooting.dll tmp.def ccd_common.o ccd_r.o -Ld:/Rcompile/CRANpkg/extralibs64new/local/lib -LD:/RCompile/recent/R-2.13.0/bin/x64 -lRblas -lgfortran -LD:/RCompile/recent/R-2.13.0/bin/x64 -lR
> installing to d:/RCompile/CRANguest/R-release/lib/lassoshooting/libs/x64
> ** R
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
> * MD5 sums
> packaged installation of 'lassoshooting' as lassoshooting_0.1.3-6.zip
>
> * DONE (lassoshooting)
>
>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list