Doug Kimzey Doug Kimzey - 5 months ago 37
C++ Question

How do I modify the include paths used by a Visual C++ project is VS 2015?

I am developing a simple C++ application in VS2015. I am getting the error message "Cannot open source file "math". So I right click the project in the solution explorer and navigate to the VC++ Directories, click the "Include Directories" entry in the right-hand pane, pull down the combo box and choose "".

The "Include Directories" dialog appears and is completely read only. I can click the "Macros>>" button and see a list of include macros, but there is no way to add them to your project.


All configuration-dependant properties, including the INCLUDE, are edited in the property-sheets:

  • Open the Tab "Property Manager", navigate to your configuration (i.e. "Debug | 64"), double click, and enter the include path there. (Save your edits)
  • Additional project-dependant INCLUDE: Open project's properties (project/Properties in Solution Manager. Navigate to "C++/Additional includes". There you can set additional includes, even if other parts of the property-dialog are readonly).
  • Math: Following include should be available from VS2015 environment:

    #include <math.h>