C++ #include is not found

后端 未结 9 595

When I compile my C++ program in Visual Studio Express it says that it can\'t find atlbase.h. Am I missing some SDK or something?

相关标签:
9条回答
  • 2020-11-27 05:22

    For users of Visual Studio 2015, ensure Common Tools for C++ is installed (part of the VS installer).

    0 讨论(0)
  • 2020-11-27 05:27

    Visual Studio 2017

    When running the Visual Studio Installer, select the Individual components tab, and under SDKs, libraries, and frameworks make sure Visual C++ ATL Support is selected.

    0 讨论(0)
  • 2020-11-27 05:28

    Solution for Visual Studio 2017 Express edition

    I had the same error when building a COM C++ project in Visual Studio 2017 Express edition. As mentioned by several users here, ATL support is not included with the Express edition of Visual Studio. So to build a C++ COM/ATL project you need at least the Community edition.

    If you really need to use the Express edition, you can download and install the Build Tools for Visual Studio 2017. Make sure to enable the 'Visual C++ ATL for x86 and x64' component during the setup.

    After that add additional VC++ directories in the project properties:

    • Include directories: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\atlmfc\include
    • Library directories: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\atlmfc\lib\x86

    The VC++ compiler should now be able to find the ATL source and library files.

    0 讨论(0)
提交回复
热议问题