简体   繁体   English

Visual Studio 2005 C ++包含路径

[英]visual studio 2005 C++ include path

In a visual C++ project, #include "abc/def/gh" means: Hey compiler, go to the abc folder which is in the same disk directory as any(first found if there are multiple found; if none is found, then try the directory where the project file is located) of the include paths, then go further down into the def folder and include the gh file inside it. 在可视C ++项目中,#include“ abc / def / gh”的意思是:嘿,编译器,转到与任何磁盘位于同一磁盘目录中的abc文件夹(如果找到多个,则首先找到;如果找不到,则尝试包含路径的项目文件所在的目录),然后再向下进入def文件夹并在其中包含gh文件。

Is it true? 是真的吗

The key thing is, path that appears in #include is physical path on the disk, right? 关键是,出现在#include中的路径是磁盘上的物理路径,对吗?

Thanks 谢谢

Yes, your analysis is correct and the path corresponds to physical path on the disk. 是的,您的分析是正确的,并且该路径对应于磁盘上的物理路径。

But there is a difference when the headers are enclosed in <> and "" . 但是,将标题包含在<>""时会有区别。 When enclosed in <> , the header is present in the standard headers location. 当包含在<> ,标头位于标准标头位置。 But if enclosed in "" , it is a user defined header file present in the project's directory. 但是,如果用""括起来,则它是项目目录中存在的用户定义的头文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM