Linux/ FreeBSD GNU GCC Common option for C compiler
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.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Understanding and using GNU GCC Compiler Parameters
- Visual basic for Linux
- How to deal with common PHP database problems
- Howto: Connect MySQL server using C program API under Linux or UNIX
- Linux or UNIX disable null passwords
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: c compiler, debug, gcc options, gnu project, Linux, o2, optimization level, optimized code, project c, unix freebsd



Recent Comments
Yesterday ~ 4 Comments
Yesterday ~ 12 Comments
Yesterday ~ 6 Comments
Yesterday ~ 21 Comments
Yesterday ~ 1 Comment