This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to just print the output for -H without output anything else?


On 2019-01-03 20:21 -0600, Peng Yu wrote:
> Hi,
> 
> I just want to print the header information. Is there a way to
> suppress the errors generated (Undefined symbols ...)? Thanks.
> 
> $ gcc -H -Iincdir main.c
> . ./main.h
> .. ./print.h
> . incdir/print1.h
> Undefined symbols for architecture x86_64:
>   "_print", referenced from:
>       _main in main-9c47c5.o
>   "_print1", referenced from:
>       _main in main-9c47c5.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)

Hmmm... clang :).  Another off-topic thread caused by Apple Mac OS X.

A "-c" option would work.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]