On Thu, 07 Oct 2004 09:45:19 -0700, Steve Fink wrote:

> I've been struggling with getting Darwin to build the dynclasses/ stuff,
> and I seem to have it working now. (Oh, and it fixes the Linux build
> too.) It's a fairly large change, and I would like to use standard
> naming conventions throughout, but I haven't really found any
> convincing, definitive source of terminology.
> 
> The issue is that on some platforms, dynamically loadable modules and
> shared libraries are different things. Although you may know them under
> different names (and one of those names is often used for the other.)
> 
> A dynamically loadable module is something you explicitly load after
> startup time, via dlopen() or some similar interface. A shared library
> is implicitly loaded at startup time; you can see a list of these under
> unix with ldd.
> 
> Under Linux, they both end in a .so extension and are built the same
> way. Under Darwin, shared libraries end in .dylib and d-l-modules end in
> whatever you want them to. The former is compiled with something like
> -dynamiclib and the latter with -bundle (or something; I don't remember
> exactly).
> 
> So what I need is names for these. At the moment, I'm mostly using $(SO)
> for shared lib extensions, $(DYNMOD) for d-l-modules. The buildflags I
> gneerally call $(LD_SHARED) or something with shared for shared libs,
> and something like $(LD_DYNMOD_FLAGS) for d-l-modules.
> 
> Clearly, I'm not very experienced with dealing with these things across
> platforms, so I was hoping somebody (Andy?) might have a better sense
> for what these things are called.

That's actually pretty interesting to me to hear.  I sort of hacked a
project that relied on dynamically loaded plugin modules to build on OSX,
and I ended up using the '-dynamiclib' flag to gcc to produce files that
file refers to as "Mach-O dynamically linked shared library ppc" which I
then open with dlopen (which is really some sort of magic compatibility
wrapper).  I always had a certain feeling that I wasn't doing it right,
but it worked and I had more important things to fix.

-- 
Jonathan

Reply via email to