User forums > Using Code::Blocks

Output objects to a specific subfolder

(1/3) > >>

eddyq:
I have my project in ./Projects. By default it puts the objects in ./Projects/obj. I want to use a different obj name called LinuxObj (the reason is because I use C::B from both Windows and Linux in which case on the Windows system I'll name WindowsObj).

I looked around and don't see an option for that so I just took a stab at Settings/Compiler/Compiler Settings/Other Options and added -o LinuxObj. (of course that didn't work).

Is there a way?

oBFusCATed:
Project -> Properties-> Build targets -> Objects output dir

eddyq:
I want it to be specific to the system I'm using. For both systems they use the same project file. Is there a way to use something in the global settings (because that sits on the platform in use)?

osdt:

--- Quote from: eddyq on April 04, 2013, 08:10:25 pm ---I want it to be specific to the system I'm using. For both systems they use the same project file. Is there a way to use something in the global settings (because that sits on the platform in use)?

--- End quote ---

It's possible by using global variables:

Settings->Global Variables: add 'my_output_dir' = somewhere
Project->Properties->Build Targets->Output Filename: $(#my_output_dir)/mydll.dll

- osdt

osdt:

--- Quote from: osdt on April 04, 2013, 08:26:39 pm ---
--- Quote from: eddyq on April 04, 2013, 08:10:25 pm ---I want it to be specific to the system I'm using. For both systems they use the same project file. Is there a way to use something in the global settings (because that sits on the platform in use)?

--- End quote ---

It's possible by using global variables:

Settings->Global Variables: add 'my_output_dir' = somewhere
Project->Properties->Build Targets->Output Filename: $(#my_output_dir)/mydll.dll

--- End quote ---

BTW: this works for 'Objects output dir' too.

- osdt

Navigation

[0] Message Index

[#] Next page

Go to full version