I am quite well acquainted with C++ but I was staring to learn C just for fun. I have seen something which is common in both gcc and g++ compilers. If I want to generate an output file then the below commands work more than fine.
g++ inputfile.cpp -o outputfile
--OR--
gcc inputfile.c -o outputfile
|
What if I want to examine its assembled version or just the compiled version? In Windows, MSVC would show me hash dumps in the output folders anyway, but I am using Linux right now.
I tried these while using gcc for a C program.
For The Assembled Version:
gcc -S inputfile.c
For The Compiles Version:
gcc -c inputfile.c
|
I am happy with that but just wanted to ask if there is a way, (other than writing my own bash scripts), to generate all three files for a specific input file, in a single stroke?
Will be very glad if anyone could help.
P.S. I know it's just a C++ forum not a C forum but since it's about the compilers and it's same for both anyway and also that it's so basic, I hope many of you will be able to help me out. Thanks a lot.