On Sun, 28 May 2000, Chunlei Ke wrote:
>
> Dear Splus-user,
>
> I have a question on dyn.load in Splus 3.4 on Unix.
> (I am sorry if it is too simple). I gathered together
> a couple of Splus, C and Fortran functions I wrote and
> borrowed, and tried to use Splus CHAPTER to make a
> chapter. "dyn.load" was used in Makefile.
>
> But when I tried to load the generated file,
> the following error message
> appeared:
> > dyn.load("snmm_l.o")
> Error in dyn.load("snmm_l.o"): no definition for 1 symbols
> In addition: Warning messages:
> Undefined symbol: loadWhich_ in: dyn.load("snmm_l.o")
> Dumped
>
> > traceback()
> Message: no definition for 1 symbols
> 3: invisible(.Internal(dyn.load(names, undefined), "S_dynload"))
> 2: dyn.load("snmm_l.o")
> 1:
>
> After looking into my S+ files, I found that the error was
> related to one Splus file, which contains the following:
> ...
> switch(family,
> binary = loadWhich <- "dbsdr",
> binomial = loadWhich <- "dbisdr",
> poisson = loadWhich <- "dpsdr",
> gamma = loadWhich <- "dgsdr",
> stop("unknown family"))
> ...
> result <- .Fortran(loadWhich,...
> ...
>
> So dyn.load couldn't find out "loadWhich" to load, which is
> generated inside.
No, not at all. The Fortran code knows nothing about the S variable
loadWhich, and you have a reference in the Fortran to "loadWhich".
Try looking in your Fortran files. (I am assuming that your `Unix'
has trailing underlines for Fortran and not C symbols. This looks
a bit strange, as normally Fortran symbols are single case.)
On most Unixes
Splus NM snmm_l.o
will show you what symbols you have defined, and that will include
loadWhich_ .
One final warning: it is not unknown for these messages to be wrong
as to the name of the missing symbol. This is particularly prevalent on
some Linux systems (so only relevant with shared libraries and S-PLUS 5.x).
--
Brian D. Ripley, ripley@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
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|