Results 1 to 7 of 7
How do you compile basic ".c" files through command console? I have gcc 3.3.4. What are the commands?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-04-2005 #1
Compiling C files
How do you compile basic ".c" files through command console? I have gcc 3.3.4. What are the commands?Registered Linux User#394486
- 08-04-2005 #2
- Join Date
- Oct 2004
Well, the basic command that you use is:
gcc [filename].cLinux registered user #358842
Human knowledge belongs to the world.
- 08-04-2005 #3
type into a terminal:
gcc -Wall something.cLife is complex, it has a real part and an imaginary part.
- 08-04-2005 #4
Now i can compile the file, but how to view the output?Registered Linux User#394486
- 08-04-2005 #5
gcc -Wall -o hello hello_world.c
./helloLife is complex, it has a real part and an imaginary part.
- 08-04-2005 #6
- Join Date
- Feb 2005
The command specified above will generate a file called a.out.
To execute the a.out file, issue the command ./a.out
If all goes well, you will see the output on the console. If you would like to change the name from a.out, issue the command mv a.out [newfilename]
JeffRegistered Linux User #391940
- 08-04-2005 #7
Great! Thanx a lot guys. Everything is working wellRegistered Linux User#394486