User forums > Using Code::Blocks
forcing Code::Blocks to put all .o files in same directory
davemalham:
Hi,
Very new to Code::Blocks but have been programming for a long time. Is there a simple way to make C::B put all the object files it generates into one directory (where the .exe or .dll goes, for example) rather than into the same directories as the source files? This would make gdb much easier to use when debugging a .dll running in a host application (specifically a VST audio plugin). Environment;
Windoze XP, gcc+ (latest stable), gdb 6.8
Thnx in advance
Dave
Jenna:
Right-click your project in "Manager" chose "Properties -> Build targets" and change the text-box "Objects output dir:" as you need it.
davemalham:
--- Quote from: jens on July 09, 2008, 05:04:09 pm ---Right-click your project in "Manager" chose "Properties -> Build targets" and change the text-box "Objects output dir:" as you need it.
--- End quote ---
Hi Jens,
Hmm, well, I already did that - it's currently set to "C:\Documents and Settings\Dave\My Documents\VSTPlugins\debug" (I've tried relative as well). What happens is that C::B builds a directory structure in there which mimics the structure of the project's folders and puts the .o files in there, rather than at the top level of \debug. So, if I build, for instance, the VST minihost application, who's source files are in C:\Documents and Settings\Dave\My Documents\vstsdk2.4\public.sdk\samples\vst2.x\minihost\source on my system, the minihost.exe executable correctly gets put in the top level of \debug but C::B adds a new directory structure of \minihost\source to the \debug directory and puts the .o's in there....
davemalham:
!!*$@#&! I've come in to work this morning and (once again) deleted all the "spurious" directories in my /debug folder, rebuilt the project and gdb has suddenly started working, finding all the files, symbols and everything :o BUT I'd swear I haven't done anything I haven't done before and C::B still builds this directory structure in my /debug folder which mimics the structure of the project's folders and puts the .o files in there - perhaps if I wait till Monday and try again then
--- Quote ---Right-click your project in "Manager" chose "Properties -> Build targets" and change the text-box "Objects output dir:"
--- End quote ---
might work :lol:
Seriously, it worries me that I don't know why it started working and it's clear, looking round the forums, that a lot of people are having similar problems with debugging - it's not confined to C::B as DevC++ also seems to be a bit problematic. Now, the main reason for me looking at C::B is to evaluate it as a cross-platform IDE for students with relatively little programming experience to use when developing VST audio plugins (and pd, Ladspa, etc) so I would really appreciate any hints which might help me track this down so that I can be more confident of being able to supply a hassle-free environment for my students.
MortenMacFly:
--- Quote from: davemalham on July 11, 2008, 11:12:52 am ---C::B still builds this directory structure in my /debug folder which mimics the structure of the project's folders and puts the .o files in there - perhaps if I wait till Monday and try again then
--- End quote ---
This is by design. Consider the following project layout:
prj
- func1:
- interfaces.cpp
- func2:
- interfaces.cpp
You would not be able to compile this project with a flat object folder. That's exactly why sub-folders need and are being created.
Navigation
[0] Message Index
[#] Next page
Go to full version