From: Ramon Gallardo C.
Subject: Re: Help me with Lisp/C.
Date: 
Message-ID: <May13.223709.25995@halcon.dpi.udec.cl>
:      I'm trying to integrates souces of Lisp (AKCL) with sources of C.
: I'm know that the function "fastlink" to make it. But my ploblem is that
: in my AKCL is'n function "si:fastlink".
: 
:      If anyone know that to make, could you please let me know.
: All help is greatly appreciated.
: 
: 
  (continuation)
      I has also attempt whit "si:faslink" but neither is it.
    Example:
 >(si:faslink file1.o file2.o)
    
 >Error: Cannot find the external symbol FASLINK #<"SYSTEM" package> 

 ...and my question is:
  Is posibility the simulation of the "faslink" function ?  How ?

 All help is greatly appreciated.
 Very thanks. 

Ramon.
e-mail: ········@halcon.dpi.udec.cl
        ········@trauco.dis.udec.cl
From: Wolfgang Koehler
Subject: Re: Help me with Lisp/C. (AKCL)
Date: 
Message-ID: <WOLF.93May17174629@gimli.first.gmd.de>
In article <··················@halcon.dpi.udec.cl> ········@halcon.dpi.udec.cl (Ramon Gallardo C.) writes:


   :      I'm trying to integrates souces of Lisp (AKCL) with sources of C.
   : I'm know that the function "fastlink" to make it. But my ploblem is that
   : in my AKCL is'n function "si:fastlink".
   : 
   :      If anyone know that to make, could you please let me know.
   : All help is greatly appreciated.
   : 
   : 

The simplest way to do this in AKCL is having a short lisp file "xyz.lsp"  which
includes the C-code and then compile it.

Eg: file "xyz.lsp" :

;;; xyz.lsp
(Clines
  %#include "c-file.c"
)

of course you have to define the entry functions to make use of the c-code.

WRT faslink, here's what the manual says :

Documentation:
FASLINK
Function in SI package:
Args: (file string)
KCL/BSD specific: Loads the FASL file FILE while linking the object files and
libraries specified by STRING.  For example,
	(faslink "foo.o" "bar.o boo.o -lpixrect")
loads foo.o while linking two object files (bar.o and boo.o) and the library
pixrect.  Usually, foo.o consists of the C language interface for the
functions defined in the object files or the libraries.

A more portable way of making references to C code, is to build it
in at the time of the original make.   If foo.c references things
in -lpixrect, and foo.o is its compilation in the akcl/unixport directory

(cd akcl/unixport ; make "EXTRAS= foo.o -lpixrect ")

should add them.   If EXTRAS was already joe.o in the unixport/makefile
you should of course add joe.o to the above "EXTRAS= joe.o foo.o.."

Faslink does not work on most UNIX systems which are derived from SYS V or AIX.

-------------------------------------------------------------------------
    ... always look on the bright side of life ... (Monty Python)
-------------------------------------------------------------------------
Wolfgang Koehler                               ····@first.gmd.de
GMD-FIRST an der TU Berlin              German National Research Centre 
Tel. (Berlin 030) 6392-1908                 for Computer Science





--

-------------------------------------------------------------------------
    ... always look on the bright side of life ... (Monty Python)
-------------------------------------------------------------------------
Wolfgang Koehler                               ····@first.gmd.de
GMD-FIRST an der TU Berlin              German National Research Centre 
Tel. (Berlin 030) 6392-1908                 for Computer Science