今天突然间出现这个错误,无论如何编译不过去,无奈百度之。
幸运,搜了两篇文章就结合自身问题解决了。看到文章的作者说寻找答案的痛苦,我真是幸运。
我的解决方法:
我看了文章以后,发现出现问题同样是拷贝了一个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,我没有具体查证过。