Visual c++ 2003/2005 how to stop compiler from generating all those other files?

Started by
4 comments, last by chollida1 19 years, 4 months ago
Hi, I'm using visual c++ 2005, I was wondering if it is possible to stop the compiler from generating all those other files. eg All I want is the .exe file, but I also get about 15megs worth of other stuff. Is there anyway to stop that?
Advertisement
Since it's using most of those files during the build, the best solution I can think of is to go into the project settings and set up a post-build event to delete the intermediate build files.
<span class="smallfont">That is not dead which can eternal lieAnd with strange aeons even death may die.   -- "The Nameless City" - H. P. Lovecraft</span>
The other files you speak of are necessary for the build process. Telling the compiler not to make .obj files and whatnot means you won't end up with an EXE. It is trivial to copy the EXE out of that folder when you want to make a release.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
It is possible to specify a different directory for the output files - you can adjust it under Linker options.

I personally have a "bin" directory within the project directory where the .exe/.dll files are copied to, this is especially useful for projects like games which most likely have some data associated with it. Having all your data/executables in a single place makes development a lot more organised. All you have to do then is delete the Release and Debug folders as all they'll contain is useless intermediate files.
copy the exe somewhere safe (it would make sense to use the post build options)

build->clean
Turing of enable minimal rebuilds and source browse info will save you alot of space if you really need it.

CHeers
Chris
CheersChris

This topic is closed to new replies.

Advertisement