在环境变量的系统变量中
添加INCLUDE变量:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
添加LIB变量C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
在Path变量中添加:C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
重启电脑即可