I am an Ubuntu user. What is the difference between g++ file.cpp -o file
and g++ -c file.cpp
?
I know that g++ -c file.cpp
creates an object file, file.o.
But what about g++ file.cpp -o file
?
I have been using this command for a long time, but I don't know the file generated as an output (it is just "file").
I have to run ./file
to execute the file.