一般小白在使用VS添加第三方库文件的时候,会发现教程在设置Include的相关目录时,有以下两种方式:
1.VC++ Directories -> Include Directories
2.C/C++ -> General -> Additional Include Directories
那这两种方式又有什么不同呢?
Sin_Geek在度娘了一些资料后,从MSDN得到了官方的解释~
The compiler searches for directories in the following order:
1.Directories containing the source file.
2.Directories specified with the /I option, in the order that CL encounters them.
3.Directories specified in the INCLUDE environment variable.
1是默认包含的路径
2中的/I是由C/C++ -> General -> Additional Include Directories设置的路径
3中的INCLUDE是由VC++ Directories -> Include Directories设置的路径