first program
Lokesh Setia
lokeshs@sh.bel.alcatel.be
Tue Nov 23 05:43:00 GMT 1999
>>>>> "Will" == Will Elmes <welmes@ptd.net> writes:
Will> this is my first attempt at compiling and running a program
Will> under linux. this doesn't make sense but when i attempt to
Will> run it absolutely nothing happens.
Will> #include <iostream.h> int main(void) { cout << "hello!!"; }
Will> then to compile: $g++ -Wall -c hello.cpp
Will> then to link(i think i need to do this?>?): $g++ hello.o -o
Will> hello
Will> then to execute: $hello
Will> i get nothing.....any help for a newbie would be
Will> appreciated.
A random advice:
Do you get nothing or do you get an error saying:
hello: command not found
In case you get the error, try running ./hello instead of hello,
it helps sometimes :-)
Regards,
Lokesh.
--
When we come back, I'll drop a line. (The Doors)
More information about the Gcc-help
mailing list