When I attempt to compile a MFC project I get told I need to include this file. What and where is it? Why do I need it?
Asked
Active
Viewed 2,101 times
1
-
1Who told you to include it? Maybe ask him/her? – Luchian Grigore Oct 01 '12 at 12:43
-
4It's the latest inane scheme of unifying version macros for Windows API. The idea is that this file sets up the various old version macros and additionally sets up the new shiny modern one that I can't recall (and probably nobody else can either). Which makes the code Visual C++ specific. – Cheers and hth. - Alf Oct 01 '12 at 12:48
1 Answers
2
It's a rather important Windows SDK header file, the very first one that gets #included in <windows.h>
. It declares Windows version numbers, the kind you should use in your program that states what version of Windows you want to be compatible with. The MSDN Library article is here.
If this file is actually missing on your machine (it isn't clear from the question) then you've either got a very old SDK version and are mixing headers (very bad) or you've got some disk damage (very very bad). It is the kind of problem you'd get when you are stuck on an ancient version of Visual Studio and are trying to use modern Windows api functions. Do not mix and match, it won't come to a good end.

Hans Passant
- 922,412
- 146
- 1,693
- 2,536