1. 程式人生 > >VS2008編譯錯誤:error C2065: 'PMIB_TCPSTATS' : undeclared identifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iphlpapi.h 411

VS2008編譯錯誤:error C2065: 'PMIB_TCPSTATS' : undeclared identifier c:\program files (x86)\microsoft sdks\windows\v7.0a\include\iphlpapi.h 411

  安裝了VS2008編譯之前的程式,結果出現了編譯錯誤,以為是VS2008的Sp1補丁沒裝好,重灌補丁後還是不行,編譯錯誤如下:

  

  雙擊錯誤會定位在iphlpapi.h中,

  一個可行的解決辦法是:把iphlpapi.h檔案的line386---line421 都註釋掉了:

  

  然後再嘗試編譯,編譯成功,執行也沒有問題。

  

  看起來,這幾行程式碼不會影響程式執行。