Web lists-archives.org

Re: [Mingw-users] windows.h dependency




>  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;}

That is rather pointless as many of the headers (especially the win*.h
ones immediately come to mind) are specifically intended not to be
included directly, but are included by windows.h.

Is this how you approach programming in general? Just randomly try
things without looking at recommended practice or code samples. I very
much doubt you will find any sample code that would include files like
wingdi.h directly.

>  So basically, a number of mingw headers won't compile unless windows.h
>  is also included.

The same presumably holds for the original versions of those headers,
from the Microsoft SDKs. As mingw is intended to be a replacement for
the Microsoft tools, it wouldn't help portability of code from
Microsoft tools to mingw *and* back if mingw started enabling coding
practises that the Microsoft SDKs don't allow, and that no code
samples and tutorials use.

All the above just IMHO, of course.

--tml

-------------------------------------------------------------------------
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