Search code examples
c++visual-studio-2010window

C++: C1083: 'afxwin.h': No such file or directory - VS2010 with VC6 daffodil


Problem:

  • If I include afxwin.h or atlbase.h, I get a C1083 ( no such file or directory)

Language:

  • c++

Tools in use:

  • Building in VS2010 Professional
  • using daffondil to use the VS6 Toolchain/buildchain
  • having installed VC6 Professional

Solution

  • Solve the Problem:

    check / correct the paths for ATL- and MFC-Includes at: Project -> Properties -> Include Directories

    What might be wrong In your D:\Users[USERNAME]\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props (or other Property-Sheets), the Include Directories-Property might have been overwritten.

    Background-Knowledge VS6 used to split ATL and MFC into two different paths:

    • VC98\ATL\include
    • VC98\MFC\include

    In VS2010 the basic path to ATL or MFC is

    • VC\atlmfc\include

    So it might be, that in your project $(VSInstDir)atlmfc is set, instead of the two separated paths. If you correct that, everything should work fine.