El lun, 25-03-2002 a las 12:55, Marco escribi�:
> 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
aren't you forgetting the "./"
in bash, when you just call "main", it will look for a file called main
in /bin, /usr/bin and a couple more directories according yo your PATH
settings. if you want to start a program sitting in your current
directory,
you have to tell bash that the file is there, and not in /bin etc...
[guest@localhost guest]$ ./main <--- ./ means "in this dir"
that should do it..
HTH
Damian
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com