Error spawning 'cl.exe'

G

Guest

Hi,

I was just shifted to a new domain on my network and all of a sudden the
project i was working on gives an error - Error spawning "cl.exe".

The project is actually a C DLL and a C# Library together.

What could be the reason?
 
C

Chris R. Timmons

Hi,

I was just shifted to a new domain on my network and all of a
sudden the project i was working on gives an error - Error
spawning "cl.exe".

The project is actually a C DLL and a C# Library together.

What could be the reason?

My best guesses:

- Permissions problem. Your code can find cl.exe, but does not
have permission to execute it.

- Your code cannot find cl.exe. If it's on a network share, this
may be due to a network drive not being mapped, or a change in the
mapped path or UNC path that cl.exe is on. If cl.exe is on your
local machine, make sure you are executing it using the full path
name, and are not using a relative path or the system's PATH
environmental variable to find it.
 
G

Guest

Hi Chris,

How do i check if my code has the permission to execute cl.exe?

I am doing all these through the Visual Studio 2003 IDE. Cl.exe is in the
classpath and the path in the Environment Variables.

Thanks
 
C

Chris R. Timmons

Hi Chris,

How do i check if my code has the permission to execute cl.exe?

I am doing all these through the Visual Studio 2003 IDE. Cl.exe
is in the classpath and the path in the Environment Variables.

I'm not clear on exactly how you are running cl.exe. Is it being
done from C# code, or from the Visual Studio IDE?

Can you run cl.exe from the command line? If so, it probably isn't a
permissions problem.

Instead of relying on the environment path to find cl.exe, try using
the full path to cl.exe when spawning it.
 
G

Guest

Hi Chris,

I figured out the problem and now my code works fine. This is what i did -

Tools-> Options -> Projects -> VC++ Directories and included the path of the
VC7 directory which is under the Program Files. Things works fine now.

Thanks a lot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top