[英]Visual Studio 2010: C/C++ global include and lib folder
How to make user include and lib folders globally and permanently available to all projects?如何使用户包含和 lib 文件夹全局且永久可用于所有项目? In Visual Studio 2008 it is Tools -> Options -> Projects and Solutions -> VC++ Directories
.在 Visual Studio 2008 中,它是Tools -> Options -> Projects and Solutions -> VC++ Directories
。 In 2010 it says deprecated... blah blah... instead use property sheets... click '?' for help...
在 2010 年,它说deprecated... blah blah... instead use property sheets... click '?' for help...
deprecated... blah blah... instead use property sheets... click '?' for help...
. deprecated... blah blah... instead use property sheets... click '?' for help...
Click and it takes you to a web page about property sheets.单击它会将您带到有关属性表的 web 页面。 Doesn't answer the basis question.不回答基础问题。 How to set user library folders globally, once and for all?如何一劳永逸地全局设置用户库文件夹?
Thank you.谢谢你。
VC++ Directories are no longer supported in VS2010 through Tools->Options page. VS2010 中不再通过工具->选项页面支持 VC++ 目录。 Instead, VS2010 introduces the user settings file (Microsoft.cpp..users.props) to control global settings including Global search path.相反,VS2010 引入了用户设置文件(Microsoft.cpp..users.props)来控制全局设置,包括全局搜索路径。 These files are located at $(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0 directory.这些文件位于 $(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0 目录中。 Upon migration to VS2010, the custom settings of VC++ Directories from VS2005 or VS2008 are migrated to these user files.迁移到 VS2010 后,VS2005 或 VS2008 的 VC++ 目录的自定义设置将迁移到这些用户文件。 These global settings files are imported into all the converted and newly created projects.这些全局设置文件被导入到所有转换的和新创建的项目中。
Here are the steps to change the settings file through UI:以下是通过 UI 更改设置文件的步骤:
- Open up property manager by clicking on View.Property Manager.通过单击 View.Property Manager 打开属性管理器。
- Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp..users" file for each Configuration|Platform.展开项目节点,然后展开配置|平台节点,您将看到每个配置|平台的“Microsoft.cpp..users”文件。 These are the files for the global settings, similar to the old tools/Options/VC++ Directories.这些是全局设置的文件,类似于旧的工具/选项/VC++ 目录。
- Multi-Select "Microsoft.cpp..users", right click and bring up the property page window多选“Microsoft.cpp..users”,右键弹出属性页window
- In the property page window, click on "VC++ Directories" (for example) in the left pane, add new paths for the directories such as "Include Directories".在属性页 window 中,单击左侧窗格中的“VC++ 目录”(例如),为目录添加新路径,例如“包含目录”。 separated by semicolons用分号隔开
- Make sure to save the settings before shutting down Visual Studio.确保在关闭 Visual Studio 之前保存设置。
- Re-launch Visual Studio and the new settings will be in effect.重新启动 Visual Studio,新设置将生效。
Note : If you would like to only change the settings for one project, you can right click on the project and bring up the property page.注意:如果您只想更改一个项目的设置,您可以右键单击该项目并调出属性页面。 Change the settings for “VC++ Directories”, these settings will be persisted to the project file.更改“VC++ 目录”的设置,这些设置将保存到项目文件中。
You can select all the project and edit them all at once.您可以 select 所有项目并一次编辑它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.