Visual C ++ Express 2010和设置环境变量解决方案范围广泛 [英] visual C++ express 2010 and setting env variables solution wide

查看:114
本文介绍了Visual C ++ Express 2010和设置环境变量解决方案范围广泛的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm C++ dev migrating to visual 2010 c++ from vim/g++. Here blog I've read that VC++ directories are no more and that I should use property pages in vs 2010 but I don't know how... Here is what I need to do. I have w solution (50 projects strong) and all of them use boost, pthreads, xercesc and few other libs. I have env variables that point to those libs on my hard drive. How can I tell VS to use them as additional include paths? Again, it's 2010 version so no vs per solution setup available. I do not want to set it manually in every project.

推荐答案

您的问题的答案也位于

The answer to your question is also in the blog that you linked to, but it's mentined in a kind of round about way:

如果打开属性管理器"视图以查看与项目关联的属性表,则会看到其中一个属性表名为Microsoft.Cpp.Win32.User.就像VCComponents.dat文件一样,此属性表实际上存储在LocalAppData中的目录%LocalAppData%\Microsoft\VisualStudio\10.0中.使用属性表上的属性编辑器(只需在该属性表节点上单击鼠标右键,然后选择"Properties ..."),您可以看到可以直接对该文件进行编辑.由于默认情况下所有项目都导入此属性表,因此您将以与以前相同的方式有效地编辑VC ++目录.

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 ++目录属性(通过视图/属性管理器"菜单选择打开它). VC ++目录设置位于"Microsoft.Cpp.Win32.user"属性表中-该属性表可编辑全局设置,因此您只需要执行一次即可.

The key is that you get to the VC++ Directories property through the "Property Manager" windows (open it via the View/"Property Manager" menu selection). The VC++ Directories setting is in the "Microsoft.Cpp.Win32.user" property sheet - that edits the global setting, so you should only have to do it once.

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

There seem to be quite a few people who dislike this change; I think that's because it's less discoverable and obvious than how the setting was managed before. The trade-off is that it's more flexible and integrates into the MSBuild architecture better, and once you do know about it it's just as easy to change as before (it's just harder to find, particularly if you're used to the old place).

这篇关于Visual C ++ Express 2010和设置环境变量解决方案范围广泛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆