(原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即可。