[R] creating dll file

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Nov 9 16:16:40 CET 2000


> Date: Thu, 9 Nov 2000 15:00:20 +0000 (GMT)
> From: "Paulo J. Ribeiro Jr" <p.ribeiro at lancaster.ac.uk>

> I'm trying to create a dll file for the windows distribution of a package.
> 
> I've tried  mingw32 and cygwin with the commands given below and it seems 
> that there is a problem related with C random() function.  
> (-mno-cygwin only included when using cygwin)
> 
> Can anybody tell me how to go around this?

Simple question: is there a C random function in the Windows runtime?
It does not seem to be in the header files, and it is not a standard C
function (it is a BSD extension).  If it is not there, you can't use it.

Why not use the R random number generator instead?


> Thanks
> P.J.
> 
> $ gcc -O2 -mno-cygwin -c function.c
> $ dllwrap -o function.dll -mno-cygwin --export-all-symbols function.o 
> dllwrap: no export definition file provided
> dllwrap: creating one, but that may not be what you want
> /usr/bin/ld: warning: cannot find entry symbol
> __cygwin_dll_entry at 12; defaulting
>  to 64f81000
> function.o(.text+0x164a):function.c: undefined reference to `random'
> function.o(.text+0x168f):function.c: undefined reference to `random'
> collect2: ld returned 1 exit status
> dllwrap: gcc exited with status 1
> 
> --------------------------------------------------------------
> 
> Paulo Justiniano Ribeiro Jr
> Dept Maths & Stats  -  Fylde College
> Lancaster University
> Lancaster LA1 4YF   -  U.K.
> 
> e-mail: paulojus at est.ufpr.br
> http://www.maths.lancs.ac.uk/~ribeiro
> 
> 
> 
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> 
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list