Re: [Mingw-users] windows.h dependency
- Date: Sat, 02 Feb 2008 17:15:26 +0000
- From: Greg Chicares <gchicares@xxxxxxxxxxxxx>
- Subject: Re: [Mingw-users] windows.h dependency
On 2008-02-02 16:49Z, NightStrike wrote:
>
> [...] I tried individually
> compiling every header in mingw with something like this in a script
> where $file is each .h header:
>
> #include <$file>
> int main() {return 0;}
This tests for the desirable property Lakos calls 'closure'.
I test it automatically before committing any header to my
own repository. BTW, you can test it this simpler way:
http://article.gmane.org/gmane.comp.gnu.mingw.user/20528
| g++ -xc++ -fsyntax-only eraseme.hpp
without creating any dummy main module.
> The number of errors drops considerably when I change it to:
>
> #include <windows.h>
> #include <$file>
> int main() {return 0;}
>
>
> So basically, a number of mingw headers won't compile unless windows.h
> is also included. If those headers require windows.h, I would think
> that they should include it themselves.
I agree.
> I am assuming that I am misunderstanding something here that everyone
> sees very clearly. Could you enlighten me?
See the last paragraph of:
http://article.gmane.org/gmane.comp.gnu.mingw.user/25389
I think it's an ancient msw pitfall that we needn't
perpetuate, so I'd be happy if you want to fix it.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users