"error: visibility attribute not supported" in Cygwin/Windows7

Ian Lance Taylor iant@google.com
Tue Apr 3 05:26:00 GMT 2012


Bernd Prager <bernd@prager.ws> writes:

> I am struggling with the visibility attribute on Cygwin 1.7, Windows7
> and g++ (GCC) 4.5.3..
> I have set "CXXFLAGS= -fvisibility=hidden". Nevertheless compilation
> fails with:
>
> error: visibility attribute not supported in this configuration; ignored
>
> I even tried to set "#pragma GCC visibility push(hidden)" in the
> source code, to no effect.

As far as I know Windows does not support symbol visibility.  I would be
happy to be corrcted on that, but that is certainly what the GCC error
message means.

Ian



More information about the Gcc-help mailing list