Anatoli,

On Thursday 26 July 2012 12:44:02 Anatoli Gorchetchnikov wrote:

> Hi all,
> 
> I have three types of projects my app can handle, so I have three respective
> parts that are loaded depending on the project type. They have some common
> functionality and settings, so these I separated in the base class KProject
> derived from KReadWritePart plus some other stuff, put it all in a library,
> and built three parts on top of it. Today I tried to convert the settings
> for these guys to KConfig XT.
> 
> So in the base library I created the project settings with <kcfgfile
> arg="true" /> and no singleton, ClassName=KInProjectConfigBase.
> Then I created settings for the parts using <include> pointing to the
> generated header and
> ClassName=KInVisualConfig
> Inherits=KInProjectConfig
> Singleton=true
> Here KInProjectConfig is my wrapper around the KInProjectConfigBase that
> takes QString (config file for respective part) and converts it to
> KSharedConfig::Ptr to pass to KInProjectConfigBase constructor.
> 
> The problem is that library builds w/o issues, but the part compiles fine
> and then fails to link claiming that references to KInProjectConfigBase
> constructor and destructor are undefined. The generated code for them is
> there, but somehow they do not become part of the library... What do I
> miss? I tried without a wrapper, just passing KSharedConfig::Ptr directly,
> same issue.

This somehow sounds like the symbols are not exported in the library. Do you 
compile the library with option -fvisibility=hidden ? Then you need to export 
the class to make it visible. See the KDE_EXPORT and KDE_IMPORT macros. A 
quick search showed this explanation, and I am sure you will find more on the 
subject:

http://benboeckel.net/blog/?p=23

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Progress isn't made by early risers. It's made by lazy men
trying to find easier ways to do something. -- Robert Heinlein
-------------------------------------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part.

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to