Absolute beginner. Help please.

I am just beginning and was doing the "Hello World" project. I have even copy and pasted the example from the tutorial, but everytime I try to compile, I get an error that reads

[Build Error] No rule to make target 'Hello World.cpp' needed by '"Hello World.o"'. Stop.

I have been having trouble finding a solution for such a basic problem. Any advice is appreciated.

1
2
3
4
5
6
7
8
9
10
  // Katie Conway - Hello World! - 6/13/2013 - (First Program)
#include <iostream>
using namespace std;

int main ()
{
  cout << "Hello World!";
  return 0;
}
Last edited on
closed account (NyhkoG1T)
Would you happen to be using Dev C++?
What IDE / Compiler are you using? maybe try to rename the file by removing the space to say hello_world.cpp
no problem in the code.
what: << hello world.o>>?
maybe you have the wrong file extension in which you saved the code
> but everytime I try to compile ...

How are you trying to compile the program?

Windows or Unix or Unix clone?

In an IDE (Visual Studio / CodeBlocks / XCode / Eclipse)?

or from the command Line (g++ / cl / make / gmake)?
I'm sorry for not including enough information, but thank you all very much!

I'm using Dev C++, and when I renamed the file by removing the space, it worked fine.

Thank you!
You really should switch to a more recent version of Dev-C++.
For instance, this one: http://sourceforge.net/projects/orwelldevcpp/
Alright, thank you for the link
Topic archived. No new replies allowed.