VS2005 VC.net fatal error C1902解決方案

今天突然間出現這個錯誤,無論如何編譯不過去,無奈百度之。

幸運,搜了兩篇文章就結合自身問題解決了。看到文章的作者說尋找答案的痛苦,我真是幸運。

我的解決方法:

我看了文章以後,發現出現問題同樣是拷貝了一個mspdb80.dll,解決方案裏面也特意提到了這個dll,我想也許是拷貝了mspdb80.dll的問題,就把拷貝到"../Microsoft Visual Studio 8/VC/Bin"mspdb80.dll刪了。把vs重啓後就好了。

或者,也有可能是設置了path,使exe可以找到了本不能找到的mspdb80.dll,建議把多加的path刪掉。

這裏爲找到的文章:感謝作者提供的方案,我還沒有嘗試這個mspdbsrv.exe。假如看到我這篇文章的人,刪了dll刪了path還是不行,建議按照下面文章再嘗試一下。


Here are steps how I got it and solve:
1. I like to compile some sources from the command prompt, so I added to the PATH environment variable - "C:/Program Files/Microsoft Visual Studio 8/VC/Bin". After that I had to copy some files from "C:Program Files/Microsoft Visual Studio 8/Common7/IDE" to get cl.exe working (one of files was mspdb80.dll).
2. Some time later I tryed to compile a project from MSDev and got C1902 error.
3. With MSDN search I got to this place to see Jonathan Caves's helpful message about mspdbsrv.exe.
4. I just copied that EXE to VC/Bin and everithing becomes Ok.
5. Now I can compile anything .

注:這個好像是VS2005的一個bug,有個hotfix,我沒有具體查證過。

發佈了35 篇原創文章 · 獲贊 5 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章