• Popular Now

• 15
• 15
• 11
• 9
• 10

Archived

This topic is now archived and is closed to further replies.

Error spawning cl.exe?!

This topic is 5394 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Never before have I encountered this error. I guess thats because I'm new to programming though. I'm doing the exercise for Chapter 5: Controlling Program Flow in C++ For Dummies. Here is the code in the book:
#include <stdio.h>
#include <iostream.h>

int main(int arg, char* pszArgs[])
{
//input first argument...

int arg1;
cout << "Enter arg1: ";
cin >> arg1;

//...and the second

int arg2;
cout<< "Enter arg2: ";
cin >> arg2;

//now decide what to do:

if (arg1 > arg2)
{
cout<< "argument 1 is greater than argument 2\n";
}
else
{
cout <<"argument 1 is not greater than argument 2\n";
}
return 0;
}

I click COMPILE and i get Error spawning cl.exe! What am I doing wrong? [edited by - Stormrage on June 16, 2003 5:01:17 PM]

Share on other sites
Well, it definitely isn''t a problem with your code. cl.exe is the compiler that MSVC++ uses.

It sounds like your installation is somehow corrupted. If I were you, I would uninstall MSVC++, then reinstall it from the installation CDs.

How appropriate. You fight like a cow.

Share on other sites
It happens ocasionally. Try a build clean, or making a new project; rebooting often works too.

Share on other sites
Had this error ... it will pop up if you have a syntax error of some sort (didn''t found out what kind of [something todo with variables - i think]). Check your syntax. (Rebooting and other crazy stuff wont help)

As this program is short ... start to remove instructions until error is gone (hard way - but it works)