This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: first program
- To: help-gcc at gnu dot org
- Subject: Re: first program
- From: hwidjaja at my-deja dot com
- Date: Tue, 23 Nov 1999 06:38:05 GMT
- Newsgroups: gnu.gcc.help
- Organization: Deja.com - Before you buy.
- References: <Lhm_3.14$ES2.1534@nnrp1.ptd.net>
- Xref: wodc7nx0 gnu.gcc.help:1933
I tried exactly the same as what you did, but I got the hello message.
try put endl at the end of cout statement.. to make sure it flush out
the message
cout << "hello" << endl;
hope this help.
In article <Lhm_3.14$ES2.1534@nnrp1.ptd.net>,
"Will Elmes" <welmes@ptd.net> wrote:
> this is my first attempt at compiling and running a program under
linux.
> this doesn't make sense but when i attempt to run it absolutely
nothing
> happens.
>
> #include <iostream.h>
> int main(void)
> {
> cout << "hello!!";
> }
>
> then to compile:
> $g++ -Wall -c hello.cpp
>
> then to link(i think i need to do this?>?):
> $g++ hello.o -o hello
>
> then to execute:
> $hello
>
> i get nothing.....any help for a newbie would be appreciated.
>
> thanks!!
>
> welmes@ptd.net
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.