Disabling visibility=hidden for certain cpp files?
Thiago Macieira
thiago at kde.org
Thu Oct 25 11:53:31 CEST 2007
Em Wednesday 24 October 2007 21:07:19 Dirk Mueller escreveu:
> On Wednesday 24 October 2007, Simon Edwards wrote:
> > I've found a hacky solution around the problem in the meantime. (string
> > replace) An official way would be neater.
>
> My suggested solution would be to use something like
>
> add_definitions(${KDE4_USE_DEFAULT_VISIBILITY})
>
> which would expand on those platforms where we support both hidden and
> default visibility to something like -fvisibility=default.
>
> we have something similar for enabling C++ exception support when needed.
>
> Good enough?
I don't think there's a Windows equivalent for that. If you use such a flag,
your code is inherently not portable to Windows.
I could be wrong though. I think gcc-on-windows supports an "export everything
defined/import everything not defined" feature, but I don't know if it helps
or if there's an equivalent for MSVC. In special, since your headers won't
have the proper markers, you may need to force all applications linking to
your library to use the same feature.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
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: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20071025/d5dc17a9/attachment.pgp
More information about the Kde-buildsystem
mailing list