WITH_PREFIX for kdemodules?

Thiago Macieira thiago at kde.org
Thu Nov 1 11:05:42 GMT 2007


Em Thursday 01 November 2007 10:12:48 Alexander Neundorf escreveu:
> On Wednesday 31 October 2007, Thiago Macieira wrote:
> > Em Wednesday 31 October 2007 16:28:46 Matthias Kretz escreveu:
> > > On Monday 29 October 2007, Jaroslaw Staniek wrote:
> > > > Is there a technical reason (e.g. some tools expect this) to use
> > > > 'lib' prefix for kde plugins?
> > >
> > > I was chatting with dirk about this once and he convinced me that it's
> > > a nice feature to have on Linux where it's possible to use the lib as
> > > plugin and shared lib at the same time. E.g. applications like konsole
> > > that provide a KPart and a shell. To save some startup time konsole on
> > > Linux could link to it's part instead of dlopening it.
> >
> > That's a great feature, but that doesn't work in all platforms.
> >
> > Fortunately, I don't know of any platform that Qt supports and where that
> > feature isn't supported. I recall MacOS X being one of them, but I no
> > longer can find that information.
> >
> > Maybe it's for MacOS X < 10.3 (which introduced dlfcn.h and dlopen(3)).
>
> Which feature ?
> Linking to a shared library (which is a plugin at the same time) which
> doesn't have the "lib" prefix ?

The feature in which "module" and "library" are the same.

Normally, you can:
 - link to a library
 - dlopen a module

With ELF, you also can:
 - dlopen a library
 - link to a module

That's because modules and libraries are the same thing called "shared 
objects".

MacOS X (Mach-O file format) has a difference between those two: modules are 
of type MH_BUNDLE while libraries are of type MH_DYLIB. But I've just checked 
the Qt/Mac builds and our plugins are MH_DYLIB -- that's probably why the 
restriction no longer applies.

None of the other platforms we support have this distinction (AIX is XCOFF, 
Windows is COFF PE, everything else is ELF).

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071101/37d7e472/attachment.sig>


More information about the kde-core-devel mailing list