Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/140.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 无法打开包含文件,尽管存在上述文件_C++_Visual Studio_Visual C++_Gnuplot_Gnuplot Iostream - Fatal编程技术网

C++ 无法打开包含文件,尽管存在上述文件

C++ 无法打开包含文件,尽管存在上述文件,c++,visual-studio,visual-c++,gnuplot,gnuplot-iostream,C++,Visual Studio,Visual C++,Gnuplot,Gnuplot Iostream,我包括如下的头文件: #include "gnuplot-iostream.h" #include <boost/iostreams/device/file_descriptor.hpp> 但它会导致37个错误,如标题中的错误。这些错误是由boost++头中的include引起的,如下所示: #include "gnuplot-iostream.h" #include <boost/iostreams/device/file_descriptor.hpp> #包括

我包括如下的头文件:

#include "gnuplot-iostream.h"
#include <boost/iostreams/device/file_descriptor.hpp>
但它会导致37个错误,如标题中的错误。这些错误是由boost++头中的include引起的,如下所示:

#include "gnuplot-iostream.h"
#include <boost/iostreams/device/file_descriptor.hpp>
#包括
我可以将每个文件和每个include中的include语法形式更改为“”,但它们有上百个,我不知道为什么编译器不在源位置搜索头文件,尽管它应该这样做。我正在使用Visual Studio 2015。如何使编译器首先搜索源位置。 我有一个正确的路径文件。我检查了几次,当我右键单击IDE中的路径并单击ShowFile选项时,它会打开它所指向的确切文件。从“”改为“”也行,但我想知道一种更好的方法。

对于Visual Studio,命令编译器不要查看源位置。你可以找到更多的信息

我认为你有几种可能性:

  • 将boost库路径添加到其他include目录
  • 加上。添加到其他包含目录
  • 更改“”的值(不建议更改,因为每次更新源时都必须更改它)
对于Visual Studio,命令编译器不要查看源位置。你可以找到更多的信息

我认为你有几种可能性:

  • 将boost库路径添加到其他include目录
  • 加上。添加到其他包含目录
  • 更改“”的值(不建议更改,因为每次更新源时都必须更改它)

很可能您为此添加到项目设置中的include路径是错误的。@drescherjm签出编辑器是否可以复制Visual Studio用于编译文件并将其粘贴到问题中的命令行?对于命令行中出现的错误,通常有很好的提示。您认为正确的内容与Visual Studio认为正确的内容之间的差异可能令人惊讶。很可能您为此添加到项目设置中的include路径是错误的。@drescherjm请检查edit是否可以复制Visual Studio用于编译文件并将其粘贴到问题中的命令行?对于命令行中出现的错误,通常有很好的提示。您认为正确的内容与VisualStudio认为正确的内容之间的差异可能令人惊讶。