Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




9.3 Verbose compilation

The -v option can also be used to display detailed information about the exact sequence of commands used to compile and link a program. Here is an example which shows the verbose compilation of the Hello World program:

$ gcc -v -Wall hello.c
Reading specs from /usr/lib/gcc-lib/i686/3.3.1/specs
Configured with: ../configure --prefix=/usr
Thread model: posix
gcc version 3.3.1
 /usr/lib/gcc-lib/i686/3.3.1/cc1 -quiet -v -D__GNUC__=3 
 hello.c -quiet -dumpbase hello.c -auxbase hello -Wall
 -version -o /tmp/cceCee26.s
GNU C version 3.3.1 (i686-pc-linux-gnu)
 compiled by GNU C version 3.3.1 (i686-pc-linux-gnu)
GGC heuristics: --param ggc-min-expand=51 
 --param ggc-min-heapsize=40036
ignoring nonexistent directory "/usr/i686/include"
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 as -V -Qy -o /tmp/ccQynbTm.o /tmp/cceCee26.s
GNU assembler version (i386-linux)
using BFD version 20020307 Debian/GNU
 --eh-frame-hdr -m elf_i386 -dynamic-linker
 /lib/ /usr/lib/crt1.o /usr/lib/crti.o
 -L/usr/lib/gcc-lib/i686/3.3.1/../../.. /tmp/ccQynbTm.o
 -lgcc -lgcc_eh -lc -lgcc -lgcc_eh

The output produced by -v can be useful whenever there is a problem with the compilation process itself. It displays the full directory paths used to search for header files and libraries, the predefined preprocessor symbols, and the object files and libraries used for linking.

  Published under the terms of the GNU General Public License Design by Interspire