From: Zhiwei Yang
Subject: Call C function in akcl
Date:
Message-ID: <4914@darmstadt.gmd.de>
Hi,
Could someone tell me how I can call C function in akcl?
I know it's no problem to call any C functions in akcl with
Clines and defentry, but the C functions have to be written
in the same module with lisp function and each line of C
language has to begin with character %. This is not practical
for those C functions distributed in several C files.
Maybe, there are other way of calling C in akcl. I have tried
to define only the most top-level C functions in lisp file with
Clines and defentry and write any other C functions (called by
those C functions defined by defentry in lisp file) in a pure
C file (without % prefix, normal C file). Now the problem is,
how can I link the lisp fasl-file with the C object file into
a complete fasl-file which could be loaded with lisp function
"load"?
I have tried to compile the C file and appended a dummy lisp
data-file to the object file to make a fasl-file, then loaded
it within akcl using "load". To my surprise, the loading is Okay!
Even surpries, the C function was executed as soon as loaded !
After that, I loaded the main fasl-file which has call to these
C functions by those defined by defentry. Unfortunately, the
akcl takes these C functions as nil.
Can someone tell me how can I configure some variables to
make the compile-file to link several object file into one
fasl-file. I can't find any clue in DOC.
Any response will be greatly appreciated!
Thanks in advance!
--
Mr. Zhiwei Yang | e-mail: ····@darmstadt.gmd.de
GMD. Rheinstr. 75 | or ····@darmstadt.gmd.dbp.de
6100 Darmstadt | German National Research Center for Computer Science
From: Zhiwei Yang
Subject: Re: Call C function in akcl
Date:
Message-ID: <4920@darmstadt.gmd.de>
===============================================================
> Could someone tell me how I can call C function in akcl?
> I know it's no problem to call any C functions in akcl with
> Clines and defentry, but the C functions have to be written
> in the same module with lisp function and each line of C
> language has to begin with character %. This is not practical
> for those C functions distributed in several C files.
> Can someone tell me how can I configure some variables to
> make the compile-file to link several object file into one
> fasl-file. I can't find any clue in DOC.
>
===============================================================
Hi,
Sorry for posting the last article. As soon as I posed
the last article, I tried the other way myself, and it succeed!
If anyone are also interested in how to load lots of pure C files
with lisp file within akcl, send me a mail, I will reply you.
--
Mr. Zhiwei Yang | e-mail: ····@darmstadt.gmd.de
GMD. Rheinstr. 75 | or ····@darmstadt.gmd.dbp.de
6100 Darmstadt | German National Research Center for Computer Science