Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 2002 12:30:22 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        geminidomino@earthlink.net (Ciro Maeitta)
Cc:        effdefender@earthlink.net (James), Freebsd-questions@FreeBSD.ORG (Freebsd-questions)
Subject:   Re: Compiling and executing a simple program
Message-ID:  <200206301630.g5UGUM607355@clunix.cl.msu.edu>
In-Reply-To: <000e01c22016$8b139180$9865fea9@asgardnet.org> from "Ciro Maeitta" at Jun 30, 2002 05:14:22 AM

next in thread | previous in thread | raw e-mail | index | archive | help
> Subject: Compiling and executing a simple program
> 
> 
> > Ok, I got my FreeBSD system up and running.  While I'm waiting for KDE to
> > finish installing from the ports collection, I decided to telnet into my
> > FreeBSD machine from my Windows '98 machine.
> >
> > I wrote a "hello world" program in C++ and tried to compile it and execute
> > it.
> > Just to make sure I was doing everything right, I telneted in to my
> school's
> > (well, ex-school's) server and did it there.  I had no problems on the
> > school's server.
> >
> [snip]
> > $ g++ -o hw hw.cpp
> > $ hw
> > hw: not found
> > $ ls
> > HW      hw      hw.cpp  hw1
> > $ hw
> > hw: not found
> > $
> 
> Are you sure the directory you are in is in your path? Your prompt doesnt
> tell me where you are working from, but on a hunch, I would say try './hw'
> instead of just 'hw'.

Iven if the directory is the path, probably the 'hw' file is not
yet in the hash table because that file was just created..
So doing './hw' is definitely needed.
////jerry

> 
> HTH
> -C
> 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206301630.g5UGUM607355>