run c-files
This is not working for me, I cant run my c-code files.
this is how I do: gcc fileName.c ./fileName.c but I cant get it to run! I have gcc installed. Whats wrong? I only get, no such file or... Do I have so save the file somewhere special? |
First, try "man gcc". Man is your friend.
Second, I believe that gcc leaves its executable output in a file called a.out by default. To produce a different file, use the -o option. For instance, try "gcc foo.c -o foo". That will compile a file "foo.c" and produce an executable "foo". To execute, try "./foo". Of course, use your own filenames rather than "foo". gcc has many interesting options. Check gcc manuals, particularly man and info. Phil |
All times are GMT -5. The time now is 02:52 AM. |