[Ecls-list] build-shared-library and export functions
Juan Jose Garcia-Ripoll
jjgarcia at users.sourceforge.net
Sun Sep 9 12:09:04 UTC 2007
Please bear in mind that there are easier ways to do the same. For
instance, you can compile your code as a *.fas file and load it using
cl_load(), and invoke the lisp functions using their lisp name. This
is a bit more stable, in the sense that this interface is not going to
change.
Alternatively, you can link your program using ECL. Then the compiler
will produce all the read_VV calls, etc.
It is all up to you.
Juanjo
2007/9/9, _ _ <swarogich at bk.ru>:
> >This is probably what you are looking for:
>
> ...
>
> >int main(int argc, char **argv)
> >{
> > cl_object result;
> > cl_boot(argc,argv);
> >
> > read_VV(OBJNULL, init_LIBTEST);
> >
> > result=test_get_msg_text(0);
> >
> >}
>
> Exactly! Now it works. I guess read_VV is calling init function that do all initialization stuff. So I created additional object file with a library constructor calling both cl_boot and read_VV plus ECL-to-C wrapper for the function, and I linked it together with ECL object file. And now it looks like an ordinary shared library without knowing for the application of any ECL related data types, functions etc. I hope there are no hidden pitfalls in this approach. Thanks for the help.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>
--
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list