User forums > General (but related to Code::Blocks)
How to auto delete .o file after being compiled?
raynebc:
Once you learn why it's helpful to keep object files, you won't mind them. You can have your program's executable file put in an entirely different folder so you don't even have to see them if that's what you prefer.
scarphin:
Deleting the object files may be possible by adding post-build steps and using CB's predefined macros but I believe it is not worth even the simplest effort as they are generated in a different folder which you can completely get rid of when you are done with your project/files. If you code only single source programs, you may choose to create a project and add a new target for every new program so you only have one project and many single source targets which may keep your files tidy enough.
abaux:
I have all my .cpps and .exes in one folder that I use to store all my programs so I am not accustomed to the .o files with CB. I am just a hobbyist programmer, nothing formal or advanced which is why I never use projects or anything. So how can I go about separating the exe and source from the object file raynebc? That would make my folder a lot more organized. Sorry if it is a very basic question, like I said I just started using CB and I am not very skilled at setting up IDEs. I took me 3 days to finally figure out how to install libcurl. Scarphin, deleting the object files sounds too complex for what its worth so if it is easier just to generate them in another folder, that would be great. Thanks everyone for the help.
stahta01:
http://wiki.codeblocks.org/index.php/Creating_a_new_project
Navigation
[0] Message Index
[*] Previous page
Go to full version