fatal error if KDE compiles with hidden visibility but Q_DECL_EXPORT is defined to nothing
Thiago Macieira
thiago at kde.org
Fri Jun 22 13:15:40 CEST 2007
Dirk Mueller said:
> On Thursday, 21. June 2007, Thiago Macieira wrote:
>
>> > 1. phonon which uses Q_DECL_EXPORT as export macro
>
> Can't phonon be fixed to not use broken Qt defines (are they documented at
> all. Why use undocumented API) ?
>
>> It's much easier and even probably better to define KDE_EXPORT as
>> Q_DECL_EXPORT (similarly for KDE_IMPORT).
>
> I disagree. coupling them with Qt deserves no purpose (there might be
> distros
> out there that compile Qt without hidden visibility for compatibility but
> still don't want a slow KDE).
Compatibility with what? This is Qt 4, those symbols have been hidden from
the start. Any application making use of them is shooting itself in the
foot (and the developer should be shot in the head for using them). I fail
to see the reason in intentionally compiling Qt without hidden visibility.
If Qt headers don't have the proper visibility guards -- i.e., if in a
distribution's provided Qt Q_DECL_EXPORT is defined to nothing -- KDE
*cannot* compile with -fvisibility=hidden.
The KDE_EXPORT macro has effect in the outcome of Qt classes.
Like I said, ELF/x86 will compile fine without the macro, but linking in
ELF/x86-64 (and other 64-bit platforms) will break.
If the distribution compiled without -fvisibility=hidden but left
Q_DECL_EXPORT alone, KDE will compile just fine. That's the point of the
macro check that Matthias posted.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
More information about the Kde-buildsystem
mailing list