Menu

Cannot open include file: 'afx.h'

Help
2010-07-20
2012-11-19
  • Adam Gaskins

    Adam Gaskins - 2010-07-20

    Hey guys, I hope this is the right place to put this. I downloaded the source files via SVN, but Can't compile them because I'm getting this error:

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

     
  • JanHgm

    JanHgm - 2010-07-20

    afx.h is from MFC. If you download the Platform SDK, you should be able to build applications.

    BTW. You did not specified which revision you downloaded.
    Is this about  Camstudio  v2.0, v2.6b  or v3.0

     
  • Adam Gaskins

    Adam Gaskins - 2010-07-20

    Oh, okay.

    And I'm just using the files in the trunk folder, which should be the latest… right?

     
  • JanHgm

    JanHgm - 2010-07-20

    Hi Adam,
    Yes,  this should result in what is called Camstudio v2.6b

    BTW. I assume you want to use Camstudio to record your  Death Worm game project. Know that the current codec used has a limitation. You cannot create AVI's greater than 2 Gb.

     
  • Adam Gaskins

    Adam Gaskins - 2010-07-20

    Alright, I'll keep that in mind. So I found that I have the afx.h in:

    C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include

    I tried right clicking the projects where the error occured, Properties > Common Properties > Framework and References > Add Path  and then adding the path, but that does nothing to get rid of the compile errors.

    If it helps, I'm using Visual C++ 2008 Express Edition

     
  • JanHgm

    JanHgm - 2010-07-20

    Should compile with VS 2008.
    Did you use Tortoise SVN for download or did you used the GNU tarball? 
    I would recommend to use TortoiseSVN.

    Properties: Debug Source files (Main project):
    Directories containing source code:
    C:\Program Files\Microsoft Visual Studio 9.0\VC\ ….
    …\crt\src
    …\atlmfc\scr\mfc\
    …\atlmfc\scr\atl\
    …\atlmfc\include\

    If you use SVNTortoise I would expect this.

     
  • Adam Gaskins

    Adam Gaskins - 2010-07-22

    I used Tortoise SVN.

    None of those folders existed under the Visual Studio 9.0 folder, only the Visual Studio 8. So I changed the paths, and verified their existence:

    C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\src\mfc
    C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include
    C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\src\atl
    C:\Program Files\Microsoft Visual Studio 8\VC\crt\src

    I put them in the Debug Source Files, but still am getting the same errors…

     

Log in to post a comment.