首先在C:\Users\用户名\AppData\Local\Microsoft\MSBuild\v4.0中找到Microsoft.Cpp.Win32.user文件,用文本格式打开,
改成下面的形式
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
其中
<PropertyGroup>
<IncludePath>;$(IncludePath)</IncludePath>
</PropertyGroup>
表示的意思就是<IncludePath>宏需要改变的继承值,例如想在<IncludePath>中添加C:\Test的路径,就将这段改为
<PropertyGroup>
<IncludePath>C:\Test;$(IncludePath)</IncludePath>
</PropertyGroup>
其他同理。