can't see header file

I get the following error on compilation:
1
2
warning C4627: '#include "sysmets.h"': skipped when looking for precompiled header use
1>  
Add directive to 'StdAfx.h' or rebuild precompiled header

The sysmets.h file is under Header Files folder.
If your project is set to use precompiled headers, the precompiled header must be THE VERY FIRST THING in the file. Only comments can be before it, nothing else.

Solutions:

1) don't use precompiled headers
2) #include your precompiled header first


In VS, unless you specifically state you want an empty project, it will often default to using precompiled headers, so you need to #include "stdafx.h" first.
Thanks, It works now, just another question:
1
2
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    PSTR szCmdLine, int iCmdShow)

Doesn't open the DOS input command line for getchar(). Is that how it's supposed to be?
this is Win32 main function so why would that open CMD?

are you shore you've selected console application?
Topic archived. No new replies allowed.