(原2013年11月28日文章,博客解封后重新发出)
背景
因需要C++与lua配合使用,在VS2012中配置VC++全局环境变量时,出现"VC++ Directories editing in Tools>Options has been deprecated".
如图所示:
官方解答
- Open up property manager by clicking on View.Property Manager.
- Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp.<Platform>.users" file for each Configuration|Platform. These are the files for the global settings, similar to the old tools/Options/VC++ Directories.
- Multi-Select "Microsoft.cpp.<Platform>.users", right click and bring up the property page 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". separated by semicolons.
- Make sure to save the settings before shutting down Visual Studio.
- Re-launch Visual Studio and the new settings will be in effect.
解释
英文较简单,一目了然。
就个人的设置步骤稍作描述:
- 打开任一项目;通过view->Property Manager,打开Property Manager界面;
- 打开Property Manager下所有子节点;
- 选择Debug|WIin32,打开其子节点;
- 选择Microsoft.Cpp.Win32.user,双击之
如果所示:
根据提示输入相关路径即可。
注意保存设置。
重新打开VS即可。