WITH_PREFIX for kdemodules?

Thiago Macieira thiago at kde.org
Mon Nov 5 21:39:37 GMT 2007

Alexander Neundorf wrote:
>Ok. So this means if every plugin would have the "lib" prefix we could
> link to every plugin (maybe on all platforms).


You can dlopen any library. You can't link to plugins, lib prefix or not. 
(Unless you do the test and verify that it works -- I didn't)

>If the plugin doesn't have the "lib" prefix, we can't link to it (at
> least on some platforms).

Even if the library doesn't have the lib prefix, we can link to it. But it 
requires the full path to it to be passed on the linker command-line. 
Definitely not recommended.

>So we have three options:
>1) leave it as it is and keep the "WITH_PREFIX" option, so some plugins
> have the "lib" prefix and others don't
>2) remove the WITH_PREFIX option and always use the "lib" prefix ->
> should bring no problems, may look at bit ugly, probably also doesn't
> bring any advantages
>3) remove the WITH_PREFIX option, never use the "lib" prefix -> slightly
> nicer code, linking to a plugin not possible (since -lkfoo won't find
> kfoo.so)
>If it's no problem for us that we cannot link to a plugin I'd vote for
> 3)

And I agree. We shouldn't be linking to plugins.

If someone wants to dlopen a library, QLibrary already prepends the "lib" 
prefix if necessary, on the proper platforms.

  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/20071105/4357f331/attachment.sig>

More information about the kde-core-devel mailing list