This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re, execuable problem on cygwin


--- Gongtao Wang <yww34@netzero.com> wrote:
> Dear Mr. Earnie,
> 
> I am a new user of cygwin.  I have installed the cygwin on top of my win '98
> ( 2nd edition).  Now I can start the cygwin environment from windows by
> clicking its icon.  The cygwin starts a simulation windows, and prompte
> 
> $ default@computer
> $
> 
> then I can use vi, gcc and all system command, but I cannot run any my own
> executables.  It always gives me an error message " file not found"
> 
> So, my question " is there some environment parameter need to be set? for
> run user's executables?"
> 

Since we're emulating UNIX, if the executable isn't found in one of the
directories in the PATH list then you can't execute the program unless you
specify the path to the executable.  E.G.: I have a program foo.c that I've
compiled and linked with `gcc -o foo foo.c' and I want to execute foo.  To do
so I would do `./foo' and the program would execute.

If you want to always to be able to execute programs in the current working
directory then add the `.' directory to the PATH e.g. export PATH=$PATH:. .  If
you wish you may modify the /etc/profile file or you can add the previous
export to the ~/.bashrc file.

BTW, see http://sources.redhat.com/cygwin/lists.html and choose an appropriate
mailing list to post your questions to.  You'll probably get a faster answer.

FAQ ALERT: This question should be answered in the FAQ and I can't find it.

Cheers,

=====
Earnie Boyd
mailto:earnie_boyd@yahoo.com

---         <http://earniesystems.safeshopper.com>         ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
---   Minimalist GNU for Windows <http://www.mingw.org/>   ---

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]