我第一次尝试在 Visual Studio 2019 中使用 xtensor,但出现“无法打开源文件“xtl/xsequence.hpp”之类的错误。
文件夹“xtl”正确位于目录中。在文件中,它被写入#include <xtl/xsequence.hpp>
并且当我将其更改为#include "xtl/xsequence.hpp"
. 我可以更改它,但错误在其他文件中发生了 73 次。有没有办法在不进行 73 次单独更改的情况下进行修复?
这是我到目前为止所做的:
出现多次的原始问题。
修复涉及将 <> 更改为“”。
的位置 xtl
到目前为止我尝试做的事情。
The angle brackets cause the preprocessor to search the directories specified by the INCLUDE environment variable for .H.The double quotation marks mean that the preprocessor searches the directory containing the parent source file first.
The compiler searches directories in the following order:
1,If specified using a #include directive in double-quote form, it first searches local directories. The search begins in the same directory as the file that contains the #include statement. If this fails to find the file, it searches in the directories of the currently opened include files, in the reverse order in which they were opened. The search begins in the directory of the parent include file and continues upward through the directories of any grandparent include files.
2、如果使用尖括号形式的#include 指令指定,或者如果本地目录搜索失败,它将搜索使用/I 选项指定的目录,按照CL 在命令行中遇到它们的顺序。
3、INCLUDE环境变量中指定的目录。
我建议您可以尝试将 xtl/xsequence.hpp 文件的路径添加到 Additional Include Directories(property ->c/c++ -> General -> Additional Include Directories)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句