The rule exists for Windows as well. Including the pre-compiled header via the command line avoids the compiler error.
----- Rom -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, August 01, 2012 4:28 PM To: Nicolás Alvarez Cc: BOINC Developers Mailing List; [email protected] Subject: Re: [boinc_dev] Coding style and includes. If I recall correctly, the pre-compiled header has to be first in windows as well. jm7 |------------> | From: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |Nicolás Alvarez <[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | To: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |BOINC Developers Mailing List <[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Date: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |08/01/2012 04:25 PM | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Subject: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |Re: [boinc_dev] Coding style and includes. | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Sent by: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |<[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| Well, gcc also supports "force-including" via the command line. But that's still a valid point. If the way we use precompiled headers needs it to be included in the .cpp file, I'd say it's a valid exception to the rule. -- Nicolás 2012/8/1 Rom Walton <[email protected]>: > That might break pre-compiled header use on platforms other than Windows. I think I am force including the pre-compiled header in the Windows project files. > > Generally compilers enforce the first include file has to be the pre-compiled header file before all others. > > It may not be a big deal. > > ----- Rom > > -----Original Message----- > From: [email protected] [ mailto:[email protected]] On Behalf Of David Anderson > Sent: Wednesday, August 01, 2012 4:15 PM > To: [email protected] > Subject: Re: [boinc_dev] Coding style and includes. > > OK, let's adopt this convention. > -- David > > On 01-Aug-2012 12:54 PM, Nicolás Alvarez wrote: >> I wouldn't really reverse it; going from general to specific is good >> too. As David Coss said, Google's C++ guidelines are worth looking. >> It's basically a combination of what you said and what I said: first >> the .h file for this .cpp file, and *then* go from general to >> specific (system headers, other libraries' headers, BOINC's headers). >> _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address. _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address. _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
