Re: I have syntax error when i execute littles programs (drag and drop) in C on Fedora...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- "bastidesamuel@xxxxxxx" <bastidesamuel@xxxxxxx>
wrote:
> When I do ./prog
> > it return to me
> > ./popo: line 4: syntax error near unexpected token
> `(' 
> > ./popo: line 4: `int main(void)'
> > 
> > 
> > I tried to search with google the problem it tell
> me that i must put
> "return 0 ;" 
> > at the end but .. I have the same error i dont
> understand .
> > 
> > Thank you very much for help , sam ... 
> 
> > 
> > Try this
> 
> $ mv prog prog.c 
> $ make prog
> $ ./prog
> Paul.
> 
> Thank you Paul,
>  so i have changed the name  prog.c unstead of prog 
> but "make prog.c" result "nothing to do ",maybe my
> little program is not
> makeable 
> I don't know I have tried a lot of " how to begin in
> C"programs but
> these errors are blocking me.
> Thank you for a reply sam ...    
> > -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe:
http://www.redhat.com/mailman/listinfo/fedora-list

Hi Samuel,

Can you re-post the code again so I can have a look at
it?  I deleted about 170 emails!

Try it again without the header files included.  Have
you tried the "Hello World" prog?

In a terminal, type: vi test.c

void main(void)
         {
          printf("Hello World!\n");
         }

Save it, quit vi, and type:

make test

If no errors, (ignore the warning about integers),
type:

./test

You should see:

Hello World!

You don't have to mess with permissions or anything if
you do this in your home directory.  This will be a
good point to start, once this works, try adding the 
#includes, and the addition function into the test.c
file.

Regards,

KEv :)

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux