无论如何要在 VS2008 中像在 VS2010 中一样在项目级别设置 VC++ 目录? [英] Is there anyway to set the VC++ Directories at project level in VS2008 as in VS2010?

查看:24
本文介绍了无论如何要在 VS2008 中像在 VS2010 中一样在项目级别设置 VC++ 目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 VS2010 中,工具 > 选项中的 VC++ 目录编辑已被弃用.VC++目录现在可以作为用户属性表使用,非常方便根据不同的项目保留include/lib目录.有什么办法可以在VS2008中做类似的事情吗?

In VS2010 the VC++ Directories editing in Tools > Options has been deprecated. VC++ Directories are now available as a user property sheet, which is very convenient to keep the include/lib directories depending on different projects. Is there any way to do the similar thing in VS2008?

推荐答案

经过仔细研究,我找到了一种方法来部分完成它:仍然使用属性表.我们可以创建一个新的属性表并设置以下项目:

After digging around, I figured out a way to partially do it: still with the property sheet. we can create a new property sheet and set following items:

C/C++->附加包含目录

linker->附加库目录

linker->附加依赖

...

这将完成大部分 VC++ 目录.但是,仍然缺少可执行目录.有两部分需要完成.

This will do most of the VC++ directories. However, the executable directories is still missing. There are two parts need to be done.

  1. 构建时的可执行路径,这可以通过添加用户宏设置:PATH(例如:c:\sss;%PATH%),然后选中底部的框以显示它因建筑环境而异.
  2. 但是,在调试 DLL 目录时可能仍会丢失.然后我们可以在项目 properties->debugging->environment:PATH=%DLLPATH%;%PATH% 中设置它,这将允许调试器将 DLLPATH 添加到环境 PATH.
  1. the executable path while building, this can be set via add user macros:PATH (for example: c:\sss;%PATH%), then check the box on the bottom to expose this variable to the building environment.
  2. However, while debugging the DLL directories may still missing. We can then set this in project properties->debugging->environment:PATH=%DLLPATH%;%PATH% which will allow the debugger add the DLLPATH to the environment PATH.

这篇关于无论如何要在 VS2008 中像在 VS2010 中一样在项目级别设置 VC++ 目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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