Computer Science Canada

Compiling trouble

Author:  Schaef [ Tue Dec 16, 2003 5:24 pm ]
Post subject:  Compiling trouble

I am completely new and am trying to compile the basic hello world program. I have tried to compile the code and get the error:

Error spawning cl.exe

Cpp1.exe - 1 error(s), 0 warning(s)

I also tried to do the code in Dev-c++ and got:

C:\Documents and Settings\C++\Dev-Cpp
unable to run program file.

Here is the source code I have been entering.. I dont think there is an error in the code:

#include <iostream>
using namespace std;
int main (void)
cout <<"This is a test";
return 0;

Author:  Schaef [ Tue Dec 16, 2003 5:38 pm ]
Post subject: 

well its not a "hello world" program but same thing

Author:  Dan [ Tue Dec 16, 2003 5:55 pm ]
Post subject: 

could you give us the full error mesage?

it worked fine on my computer.

Author:  Schaef [ Wed Dec 17, 2003 8:18 am ]
Post subject: 

Thats the whole error message i get under the "build" tab at the bottom.

Author:  naoki [ Thu Dec 18, 2003 6:00 pm ]
Post subject: 

mebbe you have more than 1 source file in your project

Author:  Dan [ Thu Dec 18, 2003 7:32 pm ]
Post subject: 

or your complier is messed up big time or you are on a system that dose not alow dos apps to be ran like most schools do. you could also try hiting the compier reset buttion of tab that some have, that has wroked for me in the past.

Author:  Schaef [ Thu Dec 18, 2003 11:36 pm ]
Post subject: 

I have the borland compiler on my comp.. do I have to set the compiler to the c++ editor or something?

Author:  jonos [ Mon Jan 26, 2004 3:01 pm ]
Post subject: 

it works fine for me. reinstall your compiler