InteractiveMind
asked on
stdafx.h ?
I'm using Visual Studio 2005 Pro, and when I create a Win32 Console app [without including the stdafx.h header], I get the following compilation error:
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
When I do include this header, it all compiles fine.
But, why is VS insisting on it? All stdafx.h contains on my comp, is:
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <tchar.h>
What's so special about it?
Thanks
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
When I do include this header, it all compiles fine.
But, why is VS insisting on it? All stdafx.h contains on my comp, is:
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <tchar.h>
What's so special about it?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
'Precompiled headers' basically are already parsed headers that are stored in binarily in .pch files to speed up compilation. If these are present, the compiler can read the information directly from them instead parsing the header files again. This is particularly useful for e.g. Windows SDK headers, since they are quite large and hardly ever change.
ASKER
Oh right, pretty self explanatory I guess - hehe
Makes great sense.
Thank you. :D
Makes great sense.
Thank you. :D
ASKER
Thanks