C1083: Cannot open include file: 'resource.h'

Project converted from VS.NET 2k3 to VS2k5.  Receive the following error in several projects (6/21) that build fine in VS2k3.  The include file exists, is part of the project (auto generated by VS2k3).  Anyone see this   Thanks.

Harrier


Answer this question

C1083: Cannot open include file: 'resource.h'

  • dwitt

    The project directory is _NOT_ in the include path by default - unless you add it with /I option, or in the list of include dirs. This is by design.

    Or dump all .h files into one flat directory if you're desperate :)

    Regards,
    --PA

  • Mark Hansen

    It's in the project folder.
  • Pablo_IN_NZ

    VS2005 does not seem to see some of the include files even if they appear under "header files" in the project tree view. You will resolve it if you specify the full path to the include file name: #include "C:\project files\Microsoft visual studio 8\VC\Include\resource.h" or whatever or another path.

  • bluewolf

    What is your compilation command prompt (from the build log). What you can do is use the /I<relative path you desire> to add any directory to you include settings.

    For help on using the /I compiler option, please see http://msdn2.microsoft.com/en-us/library/73f9s62w.aspx

    Hope this helps!

    Thanks,
      Ayman Shoukry
      VC++ Team

  • dnnguru

    Many of the #includes were unnecessary so I cleaned those up.  Joys of being on a large team.

    Did a complete CLEAN of the project and deleted all temporary and tool generated files.  Then did a Rebuild.

    This seemed to fix the issue.


  • RyHarris

    Where does the file exist on your system

    Thanks,
      Ayman Shoukry
      VC++ Team

  • Jay T103328

    I do believe it is a bug. There are also other bugs on the C++ side of IDE that i have discovered after working with it just for 2 weeks. What I did for the #include nuisance was to collect all header files from all directories in my computer into one C:\include directory and referring everything to it, I mean using it as an absolute path. The oddest thing is that only selective header files need it, others are located very easily.

  • D Danial

    Thanks, it seems to be a sensible advice.

  • Vikas62

    If you do believe this is a bug. please log it at http://lab.msdn.microsoft.com/productfeedback/ with a complete repro case so that the owners can take a look.

    Thanks,
      Ayman Shoukry
      VC++ Team
     

  • Derek.Zhang

    Is this a known bug   An absolute path will cause major headaches since we are using ClearCase for change management.  If you're unfamiliar with this tool, the drive letter changes very freqeuently so the ability to do relative paths is a MUST.
  • C1083: Cannot open include file: 'resource.h'