I'm using 2. On gcc version 4.1.2 20080704 (Red Hat 4.1.2-44) it fails. With gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) it seems OK.
Sheila ________________________________ From: [email protected] [[email protected]] on behalf of Larry Gritz [[email protected]] Sent: Tuesday, April 02, 2013 4:53 PM To: OpenImageIO developers Subject: Re: [Oiio-dev] Exporting symbols on linux using __attribute___ (visibility ("default"))) - enum problems What C++ compiler are you using? On Apr 2, 2013, at 4:51 PM, Sheila Santos wrote: Hi everyone, I'm building openimageio on linux. In src/include/export.h, OIIO_API gets set to to __attribute__ ((visibility ("default"))). It seems to work fine for functions and classes, but I get warnings and errors when this is used with enums. For example: imagebufalgo.h:94: warning: type attributes are honored only at type definition imagebufalgo.h:94: error: use of enum ‘AlignedTransform’ without previous declaration imagebufalgo.h:95: error: expected unqualified-id before ‘{’ token code looks like: enum OIIO_API AlignedTransform { TRANSFORM_NONE = 0, TRANSFORM_FLIP, // Upside-down TRANSFORM_FLOP, // Left/Right Mirrored TRANSFORM_FLIPFLOP, // Upside-down + Mirrored (Same as 180 degree rotation) // TRANSFORM_ROT90, // Rotate 90 degrees clockwise. Image remains in positive quadrant. // TRANSFORM_ROT180, // Rotate 180 degrees clockwise. Image remains in positive quadrant. (Same as FlipFlop) // TRANSFORM_ROT270, // Rotate 270 degrees clockwise. Image remains in positive quadrant. }; Is the syntax for ___attribute___ different for enums? Thanks. Sheila _______________________________________________ Oiio-dev mailing list [email protected]<mailto:[email protected]> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]<mailto:[email protected]>
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
