KDE_EXPORT and compilation breakage in kdepim

Thiago Macieira thiago.macieira at kdemail.net
Fri Dec 3 13:19:02 GMT 2004


Reinhold Kainhofer wrote:
>Okay, I'll restate: "We really need to get kdepim to compile with
> kdelibs 3.3.x, where x=0,1,2,...".

If kdelibs 3.3.1 contained a serious bug that made, say, kmail always 
crash, wouldn't you require everyone to update to 3.3.2?

What's the difference here?

>Ahm, and that's the problem. kdepim only requires kdelibs 3.3.x, where x
> can also be 0 or 1...

kdepim 3.4.0 requires kdelibs >= 3.3.2. What's the problem?

>It's not so much about me having compile problems, but about kdepim's
>general requirements. We require only kdelibs 3.3.x.

Where x >= 2. I'm sorry, but I don't agree that we should always be 
hampered by mistakes we made but have now corrected.

>So, is there any way (not a dirty hack) to make kdepim compile with
> kdelibs 3.3.1, which we can commit to kdepim HEAD?

#if !KDE_VERSION(3,3,2)
# undef KDE_EXPORT
# undef KDE_NO_EXPORT

/* Correct the macros: */
# if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 > 2)
#  define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
#  define KDE_EXPORT __attribute__ ((visibility("default")))
# else
#  define KDE_NO_EXPORT
#  define KDE_EXPORT
# endif

#endif

Make sure every file that uses KDE_EXPORT or includes a file that does 
gets that before the macro is used.

A simple way of doing so is to provide a kdemacros.h inside kdepim's 
source that gets to be used instead of the kdelibs-installed kdemacros.h. 
The file cannot be installed, though. However, that would break kdepim 
for kdelibs 3.4.0 if we do improvements to kdemacros.h -- and we did.
-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- 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/f066a18a/attachment.sig>


More information about the kde-core-devel mailing list