KDE_EXPORT and compilation breakage in kdepim

Reinhold Kainhofer reinhold at kainhofer.com
Fri Dec 3 11:29:11 GMT 2004


Hi guys,
Recently, a "fix" was  commited to kdepim, inserting KDE_EXPORT to various 
extern "C"  functions.

Now, the problem is that this breaks compilation of kdepim with kdelibs from 
kde 3.3 branch and gcc 3.3.x (which is the most common configuration of pim 
developers).

/data/kde/kde/pim/HEAD/certmanager/conf/appearanceconfigpage.cpp:73: error: 
visibility
   arg must be one of "default", "hidden", "protected" or "internal"
Error creating ../certmanager/conf/appearanceconfigpage.lo. Exit status 1.

reinhold at einstein:/kde/pim/build/certmanager$ gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-2)


Some tracking shows that the problem seems to be that in kdemacros.h from kde 
3.3.1 there is the definition
#if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 > 2)
#define KDE_EXPORT __attribute__ ((visibility("visible")))
#else
...

Obviously gcc 3.3 also doesn't understand the "visible" value for the 
visibility attribute. Since kdepim has only kdelibs 3.3 as requirement, we 
really need to get kdepim to compile with kdelibs BRANCH. 

What is the exact reason that KDE_EXPORT was added to all these methods? Is 
this absolutely necessary, or is it just an optimization? If it is absolutely 
necessary, do you see any other way to make compilation of kdepim HEAD work 
again with kdelibs BRANCH, without explicitly redefining KDE_EXPORT in all 
these files, like:
#if (__GNUC__ - 0 == 3 )
#define KDE_EXPORT 
#endif

Thanks,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology,  Austria
email: reinhold at kainhofer.com, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer / KPilot maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041203/f11cc07c/attachment.sig>


More information about the kde-core-devel mailing list