-   Programming (
-   -   How to program C in Linux command line (

backpacker 06-24-2005 04:41 AM

How to program C in Linux command line
How to edit source code(I can use editor vi?).How to compile,link and excute it?Where can I find
the tutorial about that?Thanks.

trevelluk 06-24-2005 04:52 AM

You can use vi or any other editor of your choice. To compile and link you use gcc:
gcc -o progname file1.c file2.c ....

And to run it, ./progname

trickykid 06-24-2005 06:58 AM

Moved: More suitable in Programming.

eigenyeugen 06-24-2005 06:59 PM

If you end up using more than one source file (as you should if you're writing anything but the smallest of programs) you should learn about makefiles. Googling "makefile tutorial" should give you loads of links.

johnMG 06-24-2005 07:57 PM

Learn vi, make, and what arguments you need to pass to gcc to compile and link your code the way you want.

Also read up on the LinuxQuestions wiki.

All times are GMT -5. The time now is 10:27 PM.