PRJ0003 : Error spawning 'cl.exe' and resulting error question

After trying to be fancy and installing the Platform SDK update from the CD image (5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img) for my VS.NET 2003 all hell broke loose and none of my projects in VC++ will compile. It just gives me the error “error PRJ0003 : Error spawning 'cl.exe'.”. I tried to fix is as the KB say by repairing/reinstalling VS.NET, But it still fails. I came across a blog stating that the paths went coocoo. I tried best I can to fix that too but an error is show after compiling, something about  ‘cl.exe’ returning an error.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

This has become a frustrating side project.

 

How do I set VS.NET (VC++.NET) to have its default search paths and what went wrong



Answer this question

PRJ0003 : Error spawning 'cl.exe' and resulting error question

  • kannan_poem1984

    thank you, this solved it for me after lots of searching!

  • tex77

    I also had this error. After doing the steps above I get other error:

    ------ Build started: Project: MyProjectName, Configuration: Release Win32 ------
    Compiling...
    Project : error PRJ0002 : Error result -1073741515 returned from 'F:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'.
    Build log was saved at "file://f:\Projects\MyProjectName\vc7\Release\windows\BuildLog.htm"
    MyProjectName - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========

    I have other problem too.
    I have both VS 2003 and 2005 installed (not on system drive C:\ but F:\). When I installed VS2003 I selected default options. Now I recognise that VC7 is not included (about box). I cannot compille VC projects in VS2003 allthough the files are on HDD.

    Then I tryed to compille another project in VS 2005 and I met the problem described above.

    I would appreciate any help. Thank you in advance.

    Regards,
    Mickey from Hungary

  • Jochen Kalmbach -MVP-

    Windows 2000; VC++ 2005 Express Edition

    The problem went away when I upgraded Sandboxie application. The Sandboxie web pages blamed a conflict with an unspecified 3rd party program.

  • Caitriona96

    I got a new error after fixing "VC++ Directories"

    fatal error LNK2023: bad dll or entry point 'msobj71.dll'

    Even reinstall and repair not helping.

    10s,

    Artral


  • GTi

    What kind of errors are you seeing after you fixed the paths

    The original error implies that the IDE is not finding cl.exe on your machine. Could you make sure that cl.exe exists at the Vc7\bin directory

    If it is there then I believe you can inform the IDE about it. Just start the IDE (without opening a specific project) and do the following:

    1) Go to Tools --> Options
    2) Click on the the projects folder at the left menu.
    3) Under "projects", click on "VC++ Directories"
    4) Make sure that the top right window labeled "Show directories for" contains "Executable files"
    5) click on the new New Line icon (icon similar to new folder icon on the top right)
    6) add the location where your cl.exe exists, e.g. d:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin

    Hope this helps!

    Thanks,
      Ayman Shoukry
      VC++ Team

  • MattC CLR Documentation Team

    I ran into this same problem and read the multiple copies of it on these forums, receiving nothing but a huge run-around with these supposed 'answers' given out.

    Since no one seems to want to answer your question, I will at least try:


    Question One: To reset the default paths, Open up VS and go to Tools->Import and Export Settings->Reset all Settings. You may save your old environment (I didn't), and then choose your default setup (obviously VC++ for most of us).

    If you use this option to refresh the paths (optimal), be sure to include the PlatformSDK's directories to be called before VC's. Go to Tools->Options->Projects and Solutions-> and here you will want to show directories for executables and add PSDK's \bin, and move it up to the top. Show directories for include and add PSDK's \include, and move it up to the top. Show directories for lib and add PSDK's \lib and move that up to the top. If you want to use the DirectX SDK, make sure to do the same thing with this (except for lib choose \lib\x86 if that meets your system type) and move DX above everything else.

    Question Two: The Platform SDK (and I think DirectX does) screws up your paths in its attempt to facilitate its usage. What a croc! One of the reasons it seems that cl.exe was fussing was since it could not find a file called mspdb80.dll. This file is found in the directory (yourdrive:\Microsoft Visual Studio 8\Common7\IDE). This should be included in the Executable Files area. In VS, Tools->Options->Show Directories for Executable Files->Add new line->browse to that folder/directory. Move it up so that its scanned before the rest of the junk.


    There may have been other dll's involved as well. There is a tool that seems to be shunned (for some real stupid reason after VS6.0) called Depends.exe. This is located in yourdrive:\Microsoft Visual Studio 8\Common7\Tools\Bin. If you load up cl.exe you will see what dependencies it requires.

    Btw: be careful with any batch script (.bat, .cmd) that comes with these SDK's since they are most likely culprits as well with path destructions.

    Hope this helps,

    Greg


  • PRJ0003 : Error spawning 'cl.exe' and resulting error question