[Ecls-list] Building shared libraries

Juan Jose Garcia Ripoll lisp at arrakis.es
Thu Dec 2 08:49:03 UTC 2004

Julian Stecklina wrote:

>What I need is an "entry" function that I can call. The functionality
>provided by build-shared-library is of no use to me. My code looks
>something like:
>void init_plugin(...)
>        cl_boot(...);
>        /* Initialise wrapper functions */
>        /* and some variables */
>        wrap_functions();
>        /* Load the definitions from the lisp object */
>        init_list_part();
>        return;
>The main problem is that init_plugin is the entry function that is
>called when the shared library is loaded. 
>Looking over the code I guess one could add a :init-function keyword
>parameter to the builder function and have it construct a function
>that I can call whenever it suits me. 
I have done this. Now there is an extra keyword argument, :INIT-NAME, 
that customizes the name of the entry point in a DLL, library or 
program. I hope this helps.

I hope I did not seem to stubborn in the previous emails, but the fact 
is that this initialization code is indeed very fragile and might easily 
change in near future. For instance, depending on the garbage collector 
you choose, one might need to do something different, like registering 
the library with the GC. The BUILD-* routines currently take care of that.


More information about the ecl-devel mailing list