[Ecls-list] dynamic linking vs. dynamic runtime
Juan Jose Garcia-Ripoll
jjgarcia at users.sourceforge.net
Wed Dec 20 16:34:20 UTC 2006
2006/12/20, jon klein <jk at artificial.com>:
> Would it be possible to do so if ECL was built with *both* static and
> dynamic libraries. This way I could link my program against the
> statically linked version, and have the FASL support if the
> (optional) shared library was present?
No, that is not a solution. The FASL file has to be linked against the
same runtime that is executing it. Think for instance what would
happen if you use one runtime for your application and load a FASL
that requires another, yet uninitialized runtime. Your application
will store symbols in one place, the FASL will look for them in a
different one... A complete mess.
The only thing I can offer you is to link FASL files against your
application. You must build the part of your application that contains
ECL as a DLL. Rename it as ecl.dll / libecl.so and put it where the
usual ECL library would be. Compile your FASL files against it and
then load them.
Or, if you are afraid somebody would recognize you are using ECL why
not simply rename the DLL you link to? You can do it both in your
application and in ECL itself (replace all occurences of -lecl with
the appropiate flags for the library you build, etc, etc).
Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 2804 (Spain)
More information about the ecl-devel