0

I include a header file like this:

#include "gnuplot-iostream.h"

but it causes 37 errors like in the title. The errors are caused by includes from the boost++ headers like this:

#include <boost/iostreams/device/file_descriptor.hpp>

I can change the including syntax form <> to "" in each file and every include but there are over a hundred of them, and I don't know why the compiler doesn't search for the header file in the source location although it should. I'm using Visual Studio 2015. How to make the compiler search the source location first. I have a correct path file. I checked it a few times, and when I right click on the path in IDE and click on show file option it opens the exact file it points to. And changing from <> to "" works, but I want to know a better way to do it.

Harald
  • 3,110
  • 1
  • 24
  • 35
Kweldulf
  • 76
  • 1
  • 10
  • 1
    Most likely your include paths you added to your project settings for this are wrong. – drescherjm Oct 25 '16 at 17:58
  • @drescherjm check out the edit – Kweldulf Oct 25 '16 at 18:01
  • 1
    Can you copy the command line Visual Studio is using to compile the file and paste it into your question? Often very good hints about what is going wrong in the command line. The differences between what you think is correct and what Visual Studio thinks is correct might be surprising. – user4581301 Oct 25 '16 at 18:03

1 Answers1

2

For Visual Studio, the <> tells the compiler not to look in the source location. You can find more information here.

I think you have several possibilities:

  • Add the boost library path to your additional include directories.
  • Add . to your additional include directories.
  • Change the <> for "" (not recommended because you will have to change it whenever you update your sources).
J. Calleja
  • 4,855
  • 2
  • 33
  • 54