kdeinit compiled with gcc 4.0.1 & visibility busted at runtime

Thiago Macieira thiago at kde.org
Mon Jul 18 12:13:42 BST 2005


Dirk Mueller wrote:
>On Sunday 17 July 2005 22:57, David Faure wrote:
>> +                $lines .= "\techo 'extern \"C\" KDE_EXPORT int
>> kdemain(int argc, char* argv[]);'
>
>ehm, thats just a declaration.. no need to KDE_EXPORT it (doesn't do
> anything anyway).

The KDE_EXPORT attribute takes effect even on the declaration.

In fact, given old gcc versions' behaviour, the preferred way of 
implementing an exported function is:

void func() KDE_EXPORT;
void func()
{
  ...
}

Some gcc versions will choke if you add KDE_EXPORT to the line starting 
the function implementation, some others will choke depending on where 
you add it to that line.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

3. Ac seo woruld wearð geborod, swá se Scieppend cwæð "Gewurde Unix" and 
wundor fremede and him "Unix" genemned, þæt is se rihtendgesamnung.
-------------- 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/20050718/20bfcca7/attachment.sig>


More information about the kde-core-devel mailing list