標籤彙整: Compile

Compile C code using gcc Command Line

Adopt from

http://ce.uml.edu/compile.htm


Compile C

gcc yourdotc.c

Compile C++

g++ yourdotcpp.cpp

Error will be shown if there is any error. If there is no error, you will get some .out file. The following command is entered

yourdotout.out

If you want to compiled your C program directly,

gcc –o yourCexec yourdotc.c

The executable file will be named yourCexec.