From kde-core-devel Fri Nov 02 20:07:09 2007 From: Allen Winter Date: Fri, 02 Nov 2007 20:07:09 +0000 To: kde-core-devel Subject: Re: WITH_PREFIX for kdemodules? Message-Id: <200711021607.09844.winter () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=119403409217558 On Friday 02 November 2007 16:01:36 Allen Winter wrote: > On Thursday 01 November 2007 17:38:02 Harri Porten wrote: > > Hi! > > > > On Thu, 1 Nov 2007, Thiago Macieira wrote: > > > > >>>> 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. > > > > What I still see left of this argument is that on Unix linking via -lfoo > > is more convenient and better than linking against a hardcoded libfoo.so > > directly. > > > > I wouldn't mind using "lib" on Unix but I think we should definitely > > define a rule for the convention on each platform. Now. This would > > simplify plugin loading code. At the same time entries like > > kshorturifilter.desktop should be normalized > > > > - X-KDE-Library=libkshorturifilter > > + X-KDE-Library=kshorturifilter > > > > to simplify things. > > > > I tried to rename "libkorg_journalprint" to "korg_journalprint" in KOrganizer. > I have been unable to make it work. Unless I remove the following lines > of code from kdecore/util/kpluginloader.cpp::findLibraryInternal() > #ifndef Q_OS_WIN > if (!hasPrefix) > libname = fileinfo.path() + QLatin1String("/lib") + fileinfo.fileName(); > #endif > > I think we should > 1) keep the kDebug() warning to please remove the "lib" prefix from the plugin name. > 2) don't prepend the "/lib" on non-Unix... i.e. remove the 3 lines as shown above ^^ meant to say "non-Windows" ^^ > Of course, I really don't know how much this breaks. > But it seems we need to do this for portability sakes. > > -Allen > > > >