how to compile c program in linux
Posted 03-15-2011 at 01:25 AM by sumeet inani
In windows , I used to run borland C++ compiler which also provides help on all functions defined in various libraries.
In ubuntu 10.04 I do
It will provide error output , if any. Otherwise produce a.out in current folder which can be executed
In one of my threads I learnt that you should end printf with '\n' so that buffered output is flushed on screen.
You can also use 'fflush(stdout);'
In ubuntu 10.04 I do
Code:
gcc c_program.c
Code:
./a.out
You can also use 'fflush(stdout);'
Total Comments 1
Comments
-
A habit should be developed to compile always with:
Code:gcc c_program.c -Wall -Wextra
Posted 03-15-2011 at 04:30 AM by Aquarius_Girl