Discussion:
Can't compile with VS2005: Error spawning 'cl.exe'.
(too old to reply)
Mitch Gallant
2007-05-12 11:29:02 UTC
Permalink
I have VS2005 installed and used it many times last year with no problems. I
just installed psdk WS2003 R2 (March 2006) and executed the "Visual Studio
Registration" shortcut to add the include, lib, bin etc paths for psdk to
Visual Studio.
I tried recompiling several C++ apps under VS2005 and can't compile any of
them now!

I get this compile error:

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

This looks like a problem with the VC++ Directories location and so I looked
at:
Tool |Options
at the Projects and Solutions and VC++ Directories tree and there are only 2
entries in there now, related to the newly installed PSDK:

C:\Program Files\Microsoft Platform SDK for Windows Server 2003
R2\bin\winnt
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\bin

and there is no cl.exe compiler in those bin directories.

So is this the problem? Did the registration procedure above somehow nuke
the default entry for original bin directory where VS2005 looks for the
compiler (and linker) ??
What should be the setting for VS2005 for the Executable Binaries search
path? What other default directory search paths might have been effected?

Is there a way to restore the VS2005 bin (and other general search directory
settings)?

The specific added libs included in my projects are however still correct.

- Mitch Gallant
Mitch Gallant
2007-05-12 12:36:44 UTC
Permalink
argh! I added the VS8 path and now I get this error on compiling:

Project : error PRJ0002 : Error result -1073741515 returned from 'C:\Program
Files\Microsoft Visual Studio 8\VC\bin\cl.exe'.

I created the simplest C++ project with the same error.

- Mitch
Post by Mitch Gallant
I have VS2005 installed and used it many times last year with no problems.
I just installed psdk WS2003 R2 (March 2006) and executed the "Visual
Studio Registration" shortcut to add the include, lib, bin etc paths for
psdk to Visual Studio.
I tried recompiling several C++ apps under VS2005 and can't compile any of
them now!
Project : error PRJ0003 : Error spawning 'cl.exe'.
This looks like a problem with the VC++ Directories location and so I
Tool |Options
at the Projects and Solutions and VC++ Directories tree and there are only
C:\Program Files\Microsoft Platform SDK for Windows Server 2003
R2\bin\winnt
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\bin
and there is no cl.exe compiler in those bin directories.
So is this the problem? Did the registration procedure above somehow nuke
the default entry for original bin directory where VS2005 looks for the
compiler (and linker) ??
What should be the setting for VS2005 for the Executable Binaries search
path? What other default directory search paths might have been effected?
Is there a way to restore the VS2005 bin (and other general search
directory settings)?
The specific added libs included in my projects are however still correct.
- Mitch Gallant
Mitch Gallant
2007-05-12 13:20:48 UTC
Permalink
Looks like my executable paths in VS2005 have somehow been corrupted.
This is a similar problem:
http://groups.google.com/group/microsoft.public.vc.ide_general/browse_thread/thread/dc90a46b8607ce9f/6b665e252bee71f8
I added another path and now it compiles but during the linking a similar
error occurs about "spawning 'cmd.exe'.
Probably another executable path missing.
Is there an easy way to reset the executable paths that VS2005 uses? If not,
can someone check for a working install of VS2005 and indicate what the
entire setting should be?
Thanks,
- Mitch
Post by Mitch Gallant
Project : error PRJ0002 : Error result -1073741515 returned from
'C:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'.
I created the simplest C++ project with the same error.
- Mitch
Post by Mitch Gallant
I have VS2005 installed and used it many times last year with no problems.
I just installed psdk WS2003 R2 (March 2006) and executed the "Visual
Studio Registration" shortcut to add the include, lib, bin etc paths for
psdk to Visual Studio.
I tried recompiling several C++ apps under VS2005 and can't compile any
of them now!
Project : error PRJ0003 : Error spawning 'cl.exe'.
This looks like a problem with the VC++ Directories location and so I
Tool |Options
at the Projects and Solutions and VC++ Directories tree and there are
C:\Program Files\Microsoft Platform SDK for Windows Server 2003
R2\bin\winnt
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\bin
and there is no cl.exe compiler in those bin directories.
So is this the problem? Did the registration procedure above somehow nuke
the default entry for original bin directory where VS2005 looks for the
compiler (and linker) ??
What should be the setting for VS2005 for the Executable Binaries search
path? What other default directory search paths might have been effected?
Is there a way to restore the VS2005 bin (and other general search
directory settings)?
The specific added libs included in my projects are however still correct.
- Mitch Gallant
Mitch Gallant
2007-05-12 18:54:16 UTC
Permalink
I guess psdk registration somehow purged the proper VS executable files
entries. The entries for the lib, includes however seem to correct.
Here is a solution to reconfigure the VS executable directories values:

Locate the VCComponents.dat file which holds the current directories
settings for includes, exe, libs etc:
C:\Documents and Settings\<userid>\Local Settings\Application
Data\Microsoft\VisualStudio\8.0
Move it or rename it.
Starting VS2005 again will re-create the Project directories settings for
exe, lib, includes, source etc.. with the correct default entries.
If there are some custom entries in the includes, libs etc. settings, then
add them manually from the backed up VCComponents.dat file.
This fixed the problem.

- Mitch
Post by Mitch Gallant
Looks like my executable paths in VS2005 have somehow been corrupted.
http://groups.google.com/group/microsoft.public.vc.ide_general/browse_thread/thread/dc90a46b8607ce9f/6b665e252bee71f8
I added another path and now it compiles but during the linking a similar
error occurs about "spawning 'cmd.exe'.
Probably another executable path missing.
Is there an easy way to reset the executable paths that VS2005 uses? If
not, can someone check for a working install of VS2005 and indicate what
the entire setting should be?
Thanks,
- Mitch
Post by Mitch Gallant
Project : error PRJ0002 : Error result -1073741515 returned from
'C:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'.
I created the simplest C++ project with the same error.
- Mitch
Post by Mitch Gallant
I have VS2005 installed and used it many times last year with no
problems. I just installed psdk WS2003 R2 (March 2006) and executed the
"Visual Studio Registration" shortcut to add the include, lib, bin etc
paths for psdk to Visual Studio.
I tried recompiling several C++ apps under VS2005 and can't compile any
of them now!
Project : error PRJ0003 : Error spawning 'cl.exe'.
This looks like a problem with the VC++ Directories location and so I
Tool |Options
at the Projects and Solutions and VC++ Directories tree and there are
C:\Program Files\Microsoft Platform SDK for Windows Server 2003
R2\bin\winnt
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\bin
and there is no cl.exe compiler in those bin directories.
So is this the problem? Did the registration procedure above somehow
nuke the default entry for original bin directory where VS2005 looks for
the compiler (and linker) ??
What should be the setting for VS2005 for the Executable Binaries search
path? What other default directory search paths might have been effected?
Is there a way to restore the VS2005 bin (and other general search
directory settings)?
The specific added libs included in my projects are however still correct.
- Mitch Gallant
Loading...