There is this compilation error in my project. It uses wxWidgets version 3.0.3, and is compiled by GCC in Ubuntu 8.04.
/opt/wx/3.0/include/wx-3.0/wx/dlimpexp.h|20|error: expected class-name before ‘__attribute__’|
This error appears on the second of these two lines in the file dlimpexp.h:
# define WXEXPORT __attribute__ ((visibility("default")))
# define WXIMPORT __attribute__ ((visibility("default")))
This error means, as I understand it, that the "__attribute__" token is not recognized as a GCC attribute, but instead should be preceded with a class name to define what it is. Why it is that __attribute__ is undefined in the second line above, and seems to be defined in the second is a mystery to me. Yet the second line above is line number 20 in dlimpexp.h, and is where the error is indicated.
I also can't figure why there would be an error such as this in a macro definition, which is supposed simply replace every instance of "WXIMPORT" in the source code with what follows in its line.
This file is part of the wxWidgets 3.0.3 package I compiled on my computer.