gpt4 book ai didi

c++ - visual C++ express 2010 和设置环境变量解决方案范围

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:10:31 29 4
gpt4 key购买 nike

我是 C++ 开发人员,正在从 vim/g++ 迁移到 Visual 2010 c++。这里blog我读到 VC++ 目录不再存在,我应该在 vs 2010 中使用属性页,但我不知道如何...这是我需要做的。我有 w 解决方案(50 个强大的项目),它们都使用 boost、pthreads、xercesc 和其他一些库。我有指向我硬盘驱动器上那些库的环境变量。我如何告诉 VS 将它们用作附加包含路径?同样,它是 2010 版本,因此没有可用的每个解决方案设置。我不想在每个项目中手动设置它。

最佳答案

您的问题的答案也在 blog 中。你链接到的,但它以一种迂回的方式被提及:

If you open up the Property Manager view to see the property sheets associated with your project, you’ll see that one of the property sheets is named Microsoft.Cpp.Win32.User. This property sheet is actually stored in LocalAppData, just as VCComponents.dat file was, in the directory %LocalAppData%\Microsoft\VisualStudio\10.0. Using the property editor on the property sheet (just right-click on this property sheet node and select Properties…), you can see that you are able to make edits directly to this file. Since all projects, by default, import this property sheet, you are effectively editing the VC++ directories in the same way you were able to do before.

关键是您可以通过“属性管理器”窗口访问 VC++ 目录属性(通过 View /“属性管理器”菜单选择打开它)。 VC++ 目录设置位于“Microsoft.Cpp.Win32.user”属性表中 - 编辑全局设置,因此您只需执行一次。

似乎有不少人不喜欢这个变化;我认为这是因为它比以前管理设置的方式更不易被发现和明显。权衡是它更灵活并且更好地集成到 MSBuild 体系结构中,一旦您了解它,它就像以前一样容易更改(它更难找到,特别是如果您习惯了旧地方) .

关于c++ - visual C++ express 2010 和设置环境变量解决方案范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2335030/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com