Linux/ FreeBSD GNU GCC Common option for C compiler

by on April 27, 2004· LAST UPDATED November 29, 2007

in

gcc is a GNU project C and C++ compiler for Linux, UNIX, FreeBSD etc. From the wikipedia:

GCC is a key component of the GNU toolchain. As well as being the official compiler of the GNU system, GCC has been adopted as the standard compiler by most other modern Unix-like computer operating systems, including Linux, the BSD family and Mac OS X. GCC has been ported to a wide variety of computer architectures, and is widely deployed as a tool in commercial and closed development environments.

Common gcc options:

cc -E :preprocessor
cc -S :create or show assembly coding
cc -o :object filename
cc -g :debug info
cc -O :optimized code
cc -O2 :optimized code with optimization level increased
cc -Wall :create or show all warning
cc -D_SYMBOL_ : Symbol for prerpcessor

You can use gcc instead of cc.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

Comments on this FAQ are closed. If you'd like to continue the discussion on this topic, you can do so at our forum.

Tagged as: , , , , , , , , ,

Previous post:

Next post: