Re: xlispstat for XDarwin on Mac OS X

Luke Tierney <[email protected]> Fri, 29 Mar 2002 06:33:40 -0600
Newsgroups gmane.lisp.statistics
Message-ID <[email protected]>
There may be an underscore issue in MacOS X--I believe this is one of
the few Unix-like OS's that still prepend underscores (soo the C
function foo is _foo.  The symbol lookup code may need to be changed
to handle this.  Until that is done you may need to use "_foo".

luke

On Thu, Mar 28, 2002 at 07:59:37PM -0800, Jan de Leeuw wrote:
> To do this properly, you need to use C glue code to attach the file into
> the Xlispstat system. The easiest way to do this is to use the wrap.lsp
> files. I have a paper on how to do this for MacOS 9.x (attached)
> but I havent tried it on Mac OS X yet. Can't be much different.
> 
> Toshinari Kamakura wrote:
> 
> >Thanks.
> >
> >I installed the ftp://gifi.stat.ucla.edu/pub/xlispstat.tar.gz.
> >Porbably the command "dyn-load" seems to work properly.
> >However, call-fsub cannot find internal symbol:
> >I tried the Tierney's textbook example, "foo".
> >
> >I used R command for compiling the fortran file as follows:
> >
> >R SHLIB foo.f
> >f2c <foo.f> foo.c
> >gcc -I/sw/lib/R/include -I/sw/include -fno-common -g -02 -c foo.c -o foo.o
> >gcc -bundle -flat_namespace -undefined suppress -L/sw/lib -o foo.so
> >foo.o -lf2c -lm
> >
> >(dyn-load "foo.so")
> >(call-fsub "foo" 5 (float (iseq 1 5)) 0.0)
> >
> >Error: can't find internal symbol by this name - "foo"
> >Happended in :#<Subr-CALL-FSUB: #197958>
> >
> >Of cource, on R system we can use fortran and c objects.
> >I confirmed that the xlispstat can handle *.so objects properly on the
> >usula linux system.
> >
> >+++++++++++++++++++++++++++++
> >     Toshinari Kamakura
> >
> >     Chuo University
> >     1-13-27 Kasuga
> >     Bunkyo-ku
> >     Tokyo 112-8551, Japan
> >++++++++++++++++++++++++++++++
> >
> 
> 



-- 
Luke Tierney
University of Minnesota                      Phone:           612-625-7843
School of Statistics                         Fax:             612-624-8868
313 Ford Hall, 224 Church St. S.E.           email:      [email protected]
Minneapolis, MN 55455 USA                    WWW:  http://www.stat.umn.edu