From: James Amundson
Subject: "Installing" lisp code
Date: 
Message-ID: <8vud08$k8l$1@info1.fnal.gov>
Please help a Lisp novice. I have some general-purpose lisp code
that I would like to use in my project. I know how to build the
code using mk-defsystem. I also know how to write a simple example
program to use the code as long as the example lives in the same
directory as the source. What I don't know is what Lisp paradigm
replaces the following paradigm for C code under Unix-like
systems:

Compile the code, archive it into a library, install the library
in /usr/local/lib, and install the header files in
/usr/local/include. To use it, pass "-I/usr/local/include" to the
C compiler to see the headers and "-L/usr/local/lib -l<mylib>" to
the linker to see the library. (Next, of course, comes: Run the
code. See segfault. Hunt for memory allocation problems, etc. I
would like to skip this part of the paradigm...)

I would love to RTFM, but I don't know which particular FM to R. I
am using CLISP and CMUCL under Linux. I would appreciate any
guidance.

Thanks,
Jim Amundson

From: Thomas A. Russ
Subject: Re: "Installing" lisp code
Date: 
Message-ID: <ymid7fgzx8u.fsf@sevak.isi.edu>
Normally one would just load the compiled code into the image.

That takes care of the linking part.  The include file part is not
generally needed by Lisp (although you might get some undefined function
warnings during compilation).

-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Raymond Wiker
Subject: Re: "Installing" lisp code
Date: 
Message-ID: <86pujhgpx2.fsf@raw.grenland.fast.no>
"James Amundson" <········@fnal.gov> writes:

> Please help a Lisp novice. I have some general-purpose lisp code
> that I would like to use in my project. I know how to build the
> code using mk-defsystem. I also know how to write a simple example
> program to use the code as long as the example lives in the same
> directory as the source. What I don't know is what Lisp paradigm
> replaces the following paradigm for C code under Unix-like
> systems:
> 
> Compile the code, archive it into a library, install the library
> in /usr/local/lib, and install the header files in
> /usr/local/include. To use it, pass "-I/usr/local/include" to the
> C compiler to see the headers and "-L/usr/local/lib -l<mylib>" to
> the linker to see the library. (Next, of course, comes: Run the
> code. See segfault. Hunt for memory allocation problems, etc. I
> would like to skip this part of the paradigm...)
> 
> I would love to RTFM, but I don't know which particular FM to R. I
> am using CLISP and CMUCL under Linux. I would appreciate any
> guidance.

        As long as you're using mk-defsystem, it should be as simple
as putting the "system" file in a directory pointed to by
mk:*central-registry*. As long as the system file knows the path to
the lisp files (source/binary), it should then be sufficient to use
(require :my-module) (assuming that the system file is called
my-module.system, I think).

-- 
Raymond Wiker
·············@fast.no