User forums > Using Code::Blocks
Output objects to a specific subfolder
eddyq:
--- Quote from: osdt on April 04, 2013, 08:26:39 pm ---
--- Quote from: eddyq on April 04, 2013, 08:10:25 pm ---
--- End quote ---
Settings->Global Variables: add 'my_output_dir' = somewhere
Project->Properties->Build Targets->Output Filename: $(#my_output_dir)/mydll.dll
--- End quote ---
I could not get that to work.
1) In Settings->Global Variables, I added "object_dir" to Current Variable
2) then I added my folder name where my project is to "base"
3) then I set "obj" to "obj_windows" (I want the object files to go to .\obj_windows (where . is where my project is)
4) then closed and opened Project->Properties->Build targets->Objects output dir and added $(#object_dir)\Debug\
5) then re-built
But all of the objects went to ./obj/Debug
oBFusCATed:
Are you sure that you've done it for the correct target?
Jenna:
Which version of C::B do you use ?
eddyq:
--- Quote from: jens on April 04, 2013, 09:22:24 pm ---Which version of C::B do you use ?
--- End quote ---
12.11
osdt:
--- Quote from: eddyq on April 04, 2013, 08:56:59 pm ---I could not get that to work.
1) In Settings->Global Variables, I added "object_dir" to Current Variable
2) then I added my folder name where my project is to "base"
3) then I set "obj" to "obj_windows" (I want the object files to go to .\obj_windows (where . is where my project is)
4) then closed and opened Project->Properties->Build targets->Objects output dir and added $(#object_dir)\Debug\
5) then re-built
But all of the objects went to ./obj/Debug
--- End quote ---
Set base to "obj_windows" and use $(#object_dir) for the Target. This will be relative to your project's root.
If you want to use the 'obj' part of the global, use $(#object_dir.obj)
- osdt
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version