[Kde-games-devel] What defines __KDE_HAVE_GCC_VISIBILITY? was: Build system changes: new library libkdegamesprivate
Ian Wadham
iandw.au at gmail.com
Thu May 24 00:31:53 UTC 2012
On 23/05/2012, at 7:06 AM, Albert Astals Cid wrote:
> El Dimarts, 22 de maig de 2012, a les 16:12:46, Ian Wadham va escriure:
>> On 22/05/2012, at 4:01 AM, Albert Astals Cid wrote:
>>> El Dissabte, 19 de maig de 2012, a les 14:13:41, Ian Wadham va escriure:
>>>> Somehow __KDE_HAVE_GCC_VISIBILITY was not defined in my system, although
>>>> __GNUC__ evaluates to 4. So where, in KDE, is __KDE_HAVE_GCC_VISIBILITY
>>>> defined (it is not in kdemacros.h)? And, if there is neither GCC
>>>> visibility nor Windows, should not KDE_EXPORT evaluate to some sensible
>>>> default or something uncompileable?
>>>
>>> __KDE_HAVE_GCC_VISIBILITY is defined by kdemacros.h that originates from
>>> kdelibs
>>
>> Errmmmm, no. That was exactly my problem … __KDE_HAVE_GCC_VISIBILITY
>> not defined, null KDE_EXPORT, null KDEGAMES_EXPORT, no external links to
>> libkdegames ... no build.
>>
>> __KDE_HAVE_GCC_VISIBILITY is *referenced* in kdemacros.h but it is not
>> defined there, nor can I find it in any other kdelibs include-file.
>
> It is defined there, but only if the check in FindKDE4Internal.cmake when
> compiling kdelibs succeeds.
Now that is strange … in my Linux system, <prefix>/include/kdemacros.h *does*
have "#define __KDE_HAVE_GCC_VISIBILITY", right up front. But on my Apple
system it has "/* #undef __KDE_HAVE_GCC_VISIBILITY */" in that spot.
> Did you compile your own kdelibs or someone else did?
I did, but I used Macports' "port install" command, which is like kdesrc-build only
more so. It downloads, compiles, builds and installs almost any Linux/UNIX
package, not just KDE.
What you seem to imply is that FindKDE4Internal.cmake *generates* kdemacros.h,
but only when the KDE libraries are built, so if there is a compiler change after that,
kdemacros.h does not get updated.
I will enquire on the Macports list as to how the kdelibs4 @4.8.2_0 port got built
without __KDE_HAVE_GCC_VISIBILITY being defined.
Cheers, Ian W.
More information about the kde-games-devel
mailing list