How do I compile a GCC program?

How do I compile a GCC program?
Answer
Steps
  1. Open up a terminal window on your Unix system.
  2. Type gcc –version and press ↵ Enter . This should return the version number of the C compiler.
  3. Navigate to the directory where your source code is saved.
  4. Type gcc main.c –o HelloWorld .
  5. Run your newly-compiled program.
 

Tìm kiếm

Back
Top