According to How does the compilation/linking process work?
During compilation, the compiler takes the pre-processor's output and produces an object file from it.
Additionally,
Compilation refers to the processing of source code files (.c, .cc, or .cpp) and the creation of an 'object' file.
So for example:
If I have 2 files test1.cpp
and test2.cpp
. I can do modular compilation with g++ -c test1.cpp test2.cpp
which generates 2 object files test1.o
and test.o
.
But what about during single step compilation? Where I have 1 file test1.cpp
. With the command g++ test1.cpp
, no object file appears to be generated in the directory. So what happens during single step compilation?