Reputation: 6607
Say I have a CPP file called test.cpp
. On Ubuntu using gcc 9.3.0 I can use these commands:
test.o)
test.out
from object file test.o
)test.out
)The last option is great since no intermediate object files remain after compilation. (I'm unsure whether gcc is doing everything in-memory, or whether object files are temporarily hitting disk before being cleaned up during linking).
On Windows, cl test.cpp /link /out:test.exe
creates the executable test.exe
, but also the object file test.obj
.
Is there a way to prevent MSVC from creating the intermediate object files? Alternatively, is there a link option to ask MSVC to clean up?
Upvotes: 1
Views: 664