MSVC-10 包含路径 [英] MSVC-10 Include Paths
问题描述
如何指定 MSVC 搜索包含文件的位置?我想将 boost 标头添加到搜索路径中.我没有使用 Visual Studio 项目,只是使用编译器.
How can I specify where MSVC searches for include files? I want to add the boost headers to the search path. I am not using a Visual Studio project, just the compiler.
推荐答案
您需要将它们编辑到 %INCLUDE% 环境变量中.您可以通过系统属性属性页找到它,例如
You need to edit them into %INCLUDE% environment variable. You can find this via the System Properties property pages, e.g.
- (仅限 Windows 8+)Windows+X、Y、高级系统设置
- (仅限 Windows Vista,7)Windows 键(8+ 上的 Windows+W)、env"、为您的帐户编辑环境变量
- (Windows XP) 控制面板,系统属性
- (全部)开始->运行:
sysdm.cpl
然后是高级,环境变量.
and then Advanced, Environment Variables.
VS 命令提示符也添加了自己的;你也可以修改它的批处理文件来添加你的附加文件.你会在 C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat
找到它.
The VS command prompt also adds its own; you could modify its batch file too to add your extras in. You'll find that at C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat
.
(I'd already started typing about the IDE before you edited the question. Details here)
这篇关于MSVC-10 包含路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!