Error E2209

This is a discussion on Error E2209 within the C++ Programming forums, part of the General Programming Boards category; Hello I am getting following error even I have the header file, any one can help me --------------------------------- Error E2209 ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    1

    Error E2209

    Hello I am getting following error
    even I have the header file,
    any one can help me
    ---------------------------------
    Error E2209 kjasd.cpp 5: Unable to open include file 'stdafx.h'
    Warning W8066 kjasd.cpp 21: Unreachable code in function __stdcall WndProc(HWND__ *,unsigned int,unsigned int,long)
    Warning W8066 kjasd.cpp 26: Unreachable code in function __stdcall WndProc(HWND__ *,unsigned int,unsigned int,long)
    Warning W8066 kjasd.cpp 36: Unreachable code in function __stdcall WndProc(HWND__ *,unsigned int,unsigned int,long)
    Warning W8057 kjasd.cpp 103: Parameter 'hPrevInstance' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int)
    Warning W8057 kjasd.cpp 103: Parameter 'lpCmdLine' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int)
    Warning W8057 kjasd.cpp 103: Parameter 'nCmdShow' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int)

  2. #2
    Registered User
    Join Date
    Feb 2009
    Posts
    7
    What compiler are you using?
    Where is your compiler searching for include files?
    More info would be helpful =)

  3. #3
    Professional Chef leeor_net's Avatar
    Join Date
    Apr 2004
    Location
    Charles Town, WV
    Posts
    147
    You are probably using Visual Studio Express. If that's the case, stdafx.h is not available. You will need to open your resource file (.rc) to view the source and change stdafx.h to windows.h. A quick google search would have given you this answer.

    You could also use a different compiler/ide such as Dev-C++ or Code::Blocks or get a real version of Visual Studio.
    - Leeor

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21