Driver build Error "error C2220: warning treated as error - no 'object' file generated"

VS2012 build NT driver时,发现platform选择Vista,没有任何问题,选择Win7则出现

error C2220: warning treated as error - no 'object' file generated

横看竖看没有看到问题,后来搜索发现,原来是没有使用的参数,需要用这个宏来标记:

UNREFERENCED_PARAMETER()

标记后,可以顺利build成功。


参考:

https://social.msdn.microsoft.com/Forums/zh-CN/5d335a9b-c2ed-4c7a-bbe3-73dc71ad9483/error-c2220-warning-treated-as-error-no-object-file-generated-driver?forum=wdk

你可能感兴趣的:(Driver build Error "error C2220: warning treated as error - no 'object' file generated")