[Ecls-list] calling ECL functions defined in an ASDF package from C code

Eric Schulte schulte.eric at gmail.com
Sun Jun 26 05:11:28 UTC 2011


>
> Feel free to report problems. Best,
>

This may just be my lack of familiarity with C, but I'm getting the
following error trying to run your basic example below.

>
> Juanjo
>
> $ ecl -norc

Everything inside of the repl works exactly as in your example,
generating a libfoo.so file in the current directory.  I tried to use
that library by writing the following header file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libfoo.h
Type: text/x-chdr
Size: 73 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110625/5f0451cc/attachment.h>
-------------- next part --------------

and the following C source file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use.c
Type: text/x-csrc
Size: 175 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110625/5f0451cc/attachment.c>
-------------- next part --------------

attempting to compile this program results in the following error message

    $ gcc -o use -L. -lecl -lfoo
    /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../crt1.o: In function `_start':
    [.text+0x20]: undefined reference to `main'
    collect2: ld returned 1 exit status

Thanks -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/


More information about the ecl-devel mailing list