Further to these other two postings; there is a good reson why the current
directory is not included in the PATH variable- security. There were postings
about a month ago on the subject on this list.
Cheers.
Michael
Nathan Pryor wrote:
>
> This is a path issue. cd to the directory where the executable is and try
> "./main". The dot represents your current directory.
>
> HTH,
> -nathan
>
> On Monday 25 March 2002 09:55 am, you wrote:
> > Hi!
> >
> > I am trying to create a very small application in Mandrake Linux 8.1,
> > compiling isn't the problem at this moment, I can't start the
> > application :-(
> >
> > This is the source:
> >
> > #include <stdio.h>
> >
> > int main(void)
> > {
> > printf("Hello world!\n");
> > return 0;
> > }
> >
> > then I do: gcc main.c -omain
> >
> > This works correct, there is a file created called main (displayed in
> > green).
> >
> > But when I start it, I get: bash: main: command not found
> >
> > A chmod 777 main isn't also working. Do I have (ELF???) library
> > problems?
> >
> > I noticed that I also can't start any shell script. It works only if I
> > start it directly with the "sh" command.
> >
> > Thanks in advance,
> >
> > Greets,
> >
> > Drosera!
>
> --------------------------------------------------------------------------------
> Want to buy your Pack or Services from MandrakeSoft?
> Go to http://www.mandrakestore.com
--
This isn't true in practice -- what we've missed out is Stradivarius's
constant. And then the aside: "For those of you who don't know, that's
been called by others the fiddle factor..."
-- From a 1B Electrical Engineering lecture.
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com