C1083: Cannot open include file: 'afx.h': No such file or directory

I downloaded a working project from the internet and tried building it.  I received the following error:

Compiling...

StdAfx.cpp

c:\projects\win_services\icon_service\stdafx.h(15) : fatal error C1083: Cannot open include file: 'afx.h': No such file or directory

I searched for this file with no hits.  Do I have to download the Platform SDK as well, to get this project to build

Would appreciated any help that anyone can provide

thanks in advance

Sixpack



Answer this question

C1083: Cannot open include file: 'afx.h': No such file or directory

  • kmdavisjr

    wow, thanx you figured out my problem! :) , They should really talk more about this problem, or set up express C++ to tell you that you need the full version to use MFC

  • xxz

    Which version of Visual C++ or Visual Studio do you have If you have Visual C++ 2005 Express, you will be unable to build MFC applications. (afx.h is from MFC). If you download the Platform SDK, you should be able to build applications using the Win32 API but not MFC.

    All other versions of Visual C++/Studio should include the Platform SDK and MFC/ATL support.


  • Bijaya Kumar Pathia

    All I have is the Express version. 

    Thanks very much.

    sixpack (volleyball ouch)

  • C1083: Cannot open include file: 'afx.h': No such file or directory