locked
Error spawning CL.exe?

    Question

  • What is this problem? My project can't compile? How to solve this?
    Wednesday, November 30, 2005 4:54 AM

Answers

  • These forums are specific for the VC2005 express edition an it seems that you are using VC2003

    Any ways, check http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=71217&SiteID=1 for a similar issue.


    Thanks,
      Ayman Shoukry
      VC++ Team
    Wednesday, November 30, 2005 5:39 AM
  • I solved this problem by examining what environment the IDE uses when running cl.exe. I added a custom build step to dump all environment variables (SET >env.txt) and then applied 'binary search' to find the variable that makes CL run. It turned out to be the PATH variable. In my case it was:
    PATH=D:\ProgFiles\Microsoft Visual Studio .NET 2003\Vc7\bin;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\tools;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\ide;D:\ProgFiles\HTML Help Workshop\;D:\ProgFiles\Microsoft Visual Studio .NET 2003\SDK\v1.1\bin;C:\WINXPPRO\Microsoft.NET\Framework\v1.1.4322;
    CL might use any of these paths to find the desired DLL. I simply copied all of them to my environment setup script.
    Thursday, December 29, 2005 2:35 AM

All replies

  • After i add in cl.exe path directories, when i run the project is say

    cl.exe
    this application has failed to start because mspdb71.dll not found.

    How to solve it?
    Wednesday, November 30, 2005 5:05 AM
  • These forums are specific for the VC2005 express edition an it seems that you are using VC2003

    Any ways, check http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=71217&SiteID=1 for a similar issue.


    Thanks,
      Ayman Shoukry
      VC++ Team
    Wednesday, November 30, 2005 5:39 AM
  • I'm actually using  VC2005 express Beta 2 atm and I get the following errors:

    ------ Build started: Project: MQ2Main, Configuration: Release Win32 ------

    Compiling...

    Project : error PRJ0003 : Error spawning 'cl.exe'.

    Build log was saved at "file://c:\MQ2\MQ2Main\Intermediate\BuildLog.htm"

    MQ2Main - 1 error(s), 0 warning(s)

    ------ Build started: Project: MQ2Map, Configuration: Release Win32 ------

    Linking...

    Project : error PRJ0003 : Error spawning 'link.exe'.

    Build log was saved at "file://c:\MQ2\MQ2Map\Intermediate\BuildLog.htm"

    MQ2Map - 1 error(s), 0 warning(s)

    [ ... ]

    ========== Build: 0 succeeded, 13 failed, 0 up-to-date, 0 skipped ==========

     

    And thats with a fresh install of VC++2005 Beta 2 and PSDK for Windows XP SP2 and that was after follwoing the instructions on at http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

    to get it to wrok with PSDK

     

    any ideas?

    Friday, December 23, 2005 3:06 AM
  • I solved this problem by examining what environment the IDE uses when running cl.exe. I added a custom build step to dump all environment variables (SET >env.txt) and then applied 'binary search' to find the variable that makes CL run. It turned out to be the PATH variable. In my case it was:
    PATH=D:\ProgFiles\Microsoft Visual Studio .NET 2003\Vc7\bin;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\tools;D:\ProgFiles\Microsoft Visual Studio .NET 2003\Common7\ide;D:\ProgFiles\HTML Help Workshop\;D:\ProgFiles\Microsoft Visual Studio .NET 2003\SDK\v1.1\bin;C:\WINXPPRO\Microsoft.NET\Framework\v1.1.4322;
    CL might use any of these paths to find the desired DLL. I simply copied all of them to my environment setup script.
    Thursday, December 29, 2005 2:35 AM
  • Hi,

    I m facing the same error. But i m new so can u plz explain how exactly can i do the binary search and how to add the paths to the environment setup script?

    I have both Microsoft VS .NET 2003 and VC6. Both has this error executing cl.exe. Previously all is working. After some time it jus showed this error n i can't trace back what causes it. Any help is most appreciated.

    Wednesday, March 08, 2006 2:35 AM
  • He/She simply means:
    - Search c:\ drive for mspdb71.dll
    - Since you have VS .NET 2003, you'll most likely find it in "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE"
    - Copy this path, and append it to your machine's PATH variable. (See this link for how to set PATH)

    (I don't know why folks try to be as vague as they possibly can)

    Tuesday, September 12, 2006 7:05 PM
  •  rapierguy wrote:
    I'm actually using  VC2005 express Beta 2 atm and I get the following errors:

    [ ... ]

    ========== Build: 0 succeeded, 13 failed, 0 up-to-date, 0 skipped ==========

     

    And thats with a fresh install of VC++2005 Beta 2 and PSDK for Windows XP SP2 and that was after follwoing the instructions on at http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

    I recommend that you get and install a copy of the final (non-beta) version of Visual C++ 2005 Express Edition.  You can also obtain a CD-ROM image and have that as a convenient way to reinstall as needed (recommended).

     Then use the Microsoft-recommended PSDK Integration Instructions, including the later PSDK that is recommended.  Instead of installing over the web, you can also obtain an image of the PSDK CD-ROM and burn one for yourself.

    This gives you a common baseline that others can duplicate and use to trouble-shoot your questions.

     - Dennis

    Wednesday, September 13, 2006 5:29 PM