今天安装了Microsoft Platform SDK for Windows Server 2003 R2,然后VC2005就离奇地编译不出任何工程了,哪怕是刚新建就马上编译的普通对话框工程。编译任何工程都是这样的错:1>正在编译...
1>Command line warning D4002 : ignoring unknown option '/errorReport:prompt'
1>Command line warning D4024 : unrecognized source file type '?', object file assumed
1>LINK : fatal error LNK1104: cannot open file "?.exe"已经卸载了又重新装过VS2005了,也重新打过补丁了,但还是这样。请问为什么会这样呢?谢谢!

解决方案 »

  1.   

    One of the following may be a cause: There was not enough disk space.
    The file does not exist.
    The filename or its path was incorrectly specified.
    The specified drive is invalid.
    The file does not have the appropriate permissions.
    The path for filename expands to more than 260 characters.
    If the given file is named LNKn, which is a filename generated by the linker for a temporary file, then the directory specified in the TMP environment variable may not exist, or more than one directory is specified for the TMP environment variable. (Only one directory path should be specified for the TMP environment variable.)
    If the error occurs on the executable filename, an earlier version of the executable may still be running. You will need to terminate the executable before linking it. In Windows NT or Windows 95 you can use the utility PVIEW to look for and kill instances of the application. PVIEW.EXE is shipped with Visual C++. 
    If the error message occurs for a library name, and you recently ported the .MAK file from a previous Microsoft Visual C++ development system, the library may no longer be valid. Ensure that the library still exists in this circumstance
      

  2.   

    First,very thank you for helping me!From your 回复 I learn very much.But you find's reason's 前 some 条 all have one point that don't 符合 my one 情况.That is I already 编译 no 出 any project of VC2005,all the VC2005 project 出 this same error,too.So is not the filename problem.I'm not very understand 后面 you say,my 技术 level not enough,hehe.But I think it's not the circumstance problem,because pre night I already re装 了 VS2005 once and fight up the SP1 补丁.Please ask why 出现 this case?I 怀疑 is the new 装's Microsoft Platform SDK for Windows Server 2003 R2's problem.Please ask who can help me?Very very thank you!
      

  3.   

    不会是源文件后缀是文件名吧?似乎也认不出选项/errorReport:prompt了呢,要不就把Microsoft Platform SDK for Windows Server 2003 R2卸了试试看
      

  4.   

    问题解决了,谢谢各位啊!原来要在VC++目录的可执行文件里的前面加上绝对路径如“D:\Program Files\Microsoft Visual Studio 8\VC\bin”等等,不能用它的“D$(VCInstallDir)bin”。不知道是不是因为装了新的SDK而且机器上有不同版本的VC所致。
    我搜到的网页是http://www.cppblog.com/mythma/archive/2006/05/23/7539.html?opt=admin
      

  5.   

    晕   即使版本不同,不同的版本也该对应不同的配置   一般是 $(VCInstallDir)bin  你的怎么多了个D?
      

  6.   

    搜索一下磁盘里哪里有cl.exe文件,我搜索到在C:\windows\system32目录下有个cl.exe版本是12.****,版本很老,所以会出现错误。估计是原来装了VC6后复制的文件。改个名字,再用VS2008编译,OK。
      

  7.   

    tools-->options-->project and solutions-->VC++ directories
     executable files中设置的DDK中的BIN(C:\WINDDK\3790.1830\bin\x86)移到后面去,或删除。