KPovmodeller part versioned ?
David Faure
faure at kde.org
Sat Dec 6 22:46:06 GMT 2003
On Saturday 06 December 2003 23:37, Andreas Zehender wrote:
> Hi!
>
> > The change is correct but not enough, you should use -module in the
> > LDFLAGS, and $(KDE_PLUGIN). See kdelibs/NAMING.
>
> OK, changed.
> Makefile.am looks now like this:
>
> libkpovmodelerpart_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module
> $(KDE_PLUGIN) $(LIBFREETYPE_RPATH)
> libkpovmodelerpart_la_LIBADD = $(LIBFREETYPE_LIBS) $(LIB_KPARTS) $(GLLIB)
> -lXmu -lXi
> libkpovmodelerpart_la_METASOURCES = AUTO
Looks fine.
> kpovmodeler_LDFLAGS = $(all_libraries) $(KDE_RPATH)
> kpovmodeler_SOURCES = main.cpp
> kpovmodeler_LDADD = libkpovmodelerpart.la $(LIB_KFILE)
Looks not fine. You can't link to a part (in a portable way).
Solutions:
1) Put the common code in a common lib (either shared or static, see
http://developer.kde.org/documentation/other/makefile_am_howto.html, section
"Sharing code: convenience libs"). If the app needs the actual part,
you can actually put everything into the lib, and link the part to it
with an empty dummy.cc file.
2) Dlopen the part from the app (the koffice solution).
--
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list