Click to See Complete Forum and Search --> : C++ Newbie


Magnus_Lei
03-27-2001, 10:33 AM
I write a very basic Hello World script and then i compile it.... It compiles and gives me an executable. Then i click on the hello executable and it does nothing at all. So, i thought that i would go to the command line and execute it there but it tells me "command not found". The files are located in my home directory and i thought maybe it had something to do with that.

The command i use to execute it is
g++ hello.cxx -o hello

jemfinch
03-27-2001, 10:48 AM
precede "hello" on the command line with a "./". . (the current directory) is not in your path (for good reason.)

Jeremy

Magnus_Lei
03-27-2001, 11:02 AM
Thanks that worked....Is there a way to execute the program from the GUI?

Carnel
03-27-2001, 12:30 PM
Originally posted by Magnus_Lei:
....Is there a way to execute the program from the GUI?

It's usually easiest to just use x-terminal while you're runing your programs for C++, unless you're writing GUI programs (and even then sometimes) Normally when you open it X-Windows with a file manager what happens is it opens an x-term session, runs the program and then closes the x-term session when the program finishes (or, it will just run it in the background hiding all consol output from you all together.)