[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elk] Re: dynamic library loading



On Wed, Feb 18, 2004, martin rumori wrote:

> unfortunetaly, gnustep-make doesn't use libtool and thus there are
> just .so-libraries created, not libtool-ones (.la).  elk refused to
> load them.

   elk only uses the dlname entry of the .la file. You can create a
dummy libfoo.la file containing only this line:

    dlname='libfoo.so'

   I chose to have .la as the common extension across platforms because
there is no really reliable way to know the system's preferred dynamic
object extension. Linux can use anything, but HP-UX must use .sl, for
instance.

> after some few changes in src/load.c (introducing the
> '.so' as a valid extension for libraries) i was able to load the
> library (load 'libfoo.so), but the elk_init_ magic didn't take place.

   Does your P_Provide() have a correct .la argument?

   Also, does "elk -v load -v init" give additional information?

> with elk-3.0 this was no problem.  if i don't use a library but link
> our stuff as an application against libelk, the self-parsing for
> elk_init_ doesn't work, too.

   Mmmh, I'll have a look at this. I never used this feature and I'm not
sure it still works :-)

> [...]
> 
> are there known problems regarding this issue?  what about mac os x,
> does autotools/libtool work and elk_init_ magic?

   libtool is not mandatory; it's just a convenient way to create shared
libraries without having to worry about the filename or linker options.

> i am considering to use autotools for our project rather than
> gnustep-make, but i'm a bit unsure whether this really addresses the
> problem or if it was a workaround...

   I'd try the hand-made libfoo.la trick first. :-)

-- 
Sam.
-- 
This is the elk mailing-list, see http://sam.zoy.org/projects/elk/
Trouble unsubscribing? Please contact <sam@zoy.org>
List archives are at http://sam.zoy.org/projects/elk/threads.html