none
VS 2017 .RC file - Error RC1015 cannot open include file 'afxres.h' RRS feed

  • Frage

  • Hi Folks:

       Last night, while trying to get VS 2015 to use the Windows 10 SDK, I managed to mess up the IDE to the point where a fresh install sounded like a good idea. 

       I went to MS's VS Community site for the latest download.  2017 is now the default offered version, so I downloaded and installed it.

       The compilation failed.  The only error found is in the .RC file: 

    /////////////////////////////////////////////////////////////////////////////
    //
    // Generated from the TEXTINCLUDE 2 resource.
    //
    #include "afxres.h"

       Nothing was found when I searched for the header file on the C: drive. 

       Commenting out the include caused other errors. 

       Suggestions?

          Thanks
          Larry


    Dienstag, 14. März 2017 23:46

Antworten

  • Hi,

    thanks for posting here.

    >>VS 2017 .RC file - Error RC1015 cannot open include file 'afxres.h'

    For this case, I suggest you check if you have installed vc++ feature especially the MFC support with vs2017.

    If not, please modify your vs2017 and add these features.

    Hope this could be help of you.

    Best Regards,
    Sera Yu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Als Antwort markiert a_unique_name Mittwoch, 15. März 2017 10:34
    Mittwoch, 15. März 2017 02:08

Alle Antworten

  • Hi,

    thanks for posting here.

    >>VS 2017 .RC file - Error RC1015 cannot open include file 'afxres.h'

    For this case, I suggest you check if you have installed vc++ feature especially the MFC support with vs2017.

    If not, please modify your vs2017 and add these features.

    Hope this could be help of you.

    Best Regards,
    Sera Yu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Als Antwort markiert a_unique_name Mittwoch, 15. März 2017 10:34
    Mittwoch, 15. März 2017 02:08
  • Thanks Sera Yu:

       I couldn't find a description of what components I'd installed so I did a re-install of VS2017. 

       The default install didn't have the "MFC and ATL support (x86 and x64)" item selected by default.  I selected that item, along with a bunch of other things. 

       Is there a quick method to change the SDK version for every project in a "Solution"? 

       It was tedious going through the properties for 34 projects. 

       After setting each project's SDK, the build was successful. 

       I appreciate your assistance. 

          Thanks
          Larry

    Mittwoch, 15. März 2017 10:34
  • If you want to update the same project settings over multiple projects, you can hold down control and left click on each project that you want to change the settings on. If you then go into the project properties, then the common properties between those projects will be editable and any changes will apply to all projects that you had selected.

    This may perform terribly though, so be warned.


    This is a signature Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Mittwoch, 15. März 2017 14:18
  • Assuming windows kit is installed. I solved l error RC1015 using and running the vcvars32.bat file in command line environment which is found in the bin directory under the VC installation directory.or use everything tool to find it. It's limited to setting the appropriate environment variables to enable 32-bit x86 command-line builds. It's the equivalent of the vcvarsall x86 command. https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx?f=255&MSPPError=-2147217396


    Dienstag, 24. Juli 2018 15:20
  • In the newest version of Visual Studio 2017 this seems to have been separated into two components that needs to be installed.

    1. Visual C++ ATL for x86 and x64
    2. Visual C++ MFC for x86 and x64
    Montag, 27. August 2018 08:13
  • Tools -> Get Tools and Features... will list what components are installed and allow for adding and removing of components.
    Freitag, 4. Januar 2019 10:04