From: Andrew S. <ac...@sy...> - 2002-12-04 22:59:42
|
Forgot to cc this to the list (again) -----Original Message----- From: Andrew Stadt [mailto:ac...@sy...] Sent: December 4, 2002 16:36 To: Al Stevens Subject: RE: [Mingw-users] Rectangle defined? IIRC, with 3.2, you need to define __GTHREAD_HIDE_WIN32API to prevent it from including windows.h. I believe this is the default for 3.2.1. HTH, Andrew. >-----Original Message----- >From: min...@li... >[mailto:min...@li...]On Behalf Of Al Stevens >Sent: December 4, 2002 16:17 >To: Min...@li... >Subject: [Mingw-users] Rectangle defined? > > >Here's an odd one. The following program will not compile with 3.2. > >// test.cpp >#include <iostream> >struct Rectangle { int x; }; >int main() >{ > Rectangle* rp; > return 0; >} > >gcc test.cpp -lstdc++ > >It does not like my use of Rectangle. If I change Rectangle to >Rectangles or >rectangle, the program compiles. If I remove the #include <iostream> >statement, it compiles. If I change the rp declaration to struct Rectangle, >it compiles. If I use 2.95.3, it compiles. Something in 3.2 is erroneously >defining Rectangle as an object name in the global namespace, and the >compiler thinks I am multiplying whatever it thinks Rectangle is times rp, >which it reports as undeclared. The only Rectangle I've found among the >headers has to do with the winapi, but, as you can see, this program does >not use the winapi. > >I have not yet downloaded the updated winapi. Is this perhaps >already fixed? > >Al Stevens > > > >------------------------------------------------------- >This SF.net email is sponsored by: Microsoft Visual Studio.NET >comprehensive development tool, built to increase your >productivity. Try a free online hosted session at: >http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en >_______________________________________________ >MinGW-users mailing list >Min...@li... > >You may change your MinGW Account Options or unsubscribe at: >https://lists.sourceforge.net/lists/listinfo/mingw-users |