Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: msdobrescu on August 23, 2016, 11:33:23 am

Title: How to set the build output path for the final executable
Post by: msdobrescu on August 23, 2016, 11:33:23 am
Hello,

I know it is a basic question, but I don't get how to set the build output path for the final executable of some mingw-w64 project.
Where should I set it per build type (release/debug/...)?

Next, how could I set the extension?
I build a dll, but it must have "aip" and not "dll" extension.
When I change the extension, C::B seems to correct it to "dll".

Also, if I need to store the intermediary obj files on build type path (debug-x64, release-x64), how could I do this? Is there a setting?

Thank you.
Title: Re: How to set the build output path for the final executable
Post by: stahta01 on August 23, 2016, 05:05:12 pm
Menu "Project" -> "Property"
Tab "Build Targets"
Title: Re: How to set the build output path for the final executable
Post by: msdobrescu on August 23, 2016, 05:08:31 pm
Hmm.
I have tried that already.
No effect.
Title: Re: How to set the build output path for the final executable
Post by: stahta01 on August 23, 2016, 05:14:00 pm
Hmm.
I have tried that already.
No effect.

Did  you change the values?
If yes, what values?
Did you re-build the project?
If not, do so.

Tim S.
Title: Re: How to set the build output path for the final executable
Post by: stahta01 on August 23, 2016, 05:15:45 pm
Make sure you at least uncheck "Auto-generate filename extension"!

Tim S.
Title: Re: How to set the build output path for the final executable
Post by: msdobrescu on August 23, 2016, 07:51:26 pm
Awesome!
It seems to be a bug.
I alter values, press save, build etc..
It uses old values.
I close C::B, it asks to save the project and perspective.
I say "yes".
I reopen C::B, works correctly, builds on my paths etc..
Idem for the other settings.
I use the "portable" version.
Title: Re: How to set the build output path for the final executable
Post by: stahta01 on August 23, 2016, 09:04:27 pm
Awesome!
It seems to be a bug.
I alter values, press save, build etc..
It uses old values.
I close C::B, it asks to save the project and perspective.
I say "yes".
I reopen C::B, works correctly, builds on my paths etc..
Idem for the other settings.
I use the "portable" version.

I for one will ignore this "bug"; since, you failed to do a rebuild instead of a build!

Tim S.
Title: Re: How to set the build output path for the final executable
Post by: msdobrescu on August 23, 2016, 09:24:33 pm
I don't really get what you mean. I did not fail anything. It fails to update the settings and re-build if necessary.
I shouldn't re-build explicitly, it should update the build accordingly.

You could ignore a bug, but it won't ignore you...
Title: Re: How to set the build output path for the final executable
Post by: stahta01 on August 23, 2016, 09:29:31 pm
I don't really get what you mean. I did not fail anything. It fails to update the settings and re-build if necessary.
I shouldn't re-build explicitly, it should update the build accordingly.

You could ignore a bug, but it won't ignore you...

You are now on my list of people that I will try to ignore!!

Tim S.
Title: Re: How to set the build output path for the final executable
Post by: msdobrescu on August 23, 2016, 10:01:59 pm
Don't try! Do it! Please.
Title: Re: How to set the build output path for the final executable
Post by: frithjofh on August 24, 2016, 01:22:51 am
not necesary to try...

when it is built already, changing the settings wont automagically trigger a rebuild when you hit the build button... it will just do nothing, because it is already built.

if you want a new built with new settings, then hit the rebuild button.

imho if or if not a change of settings should automatically trigger a rebuild implies way too much complexity in the overall process. better leave that as is
Title: Re: How to set the build output path for the final executable
Post by: msdobrescu on August 25, 2016, 10:03:01 am
No, I say something else.
I change the settings > build (when I say "build" means I press one of them and it starts building, consider pressing the right button from your point of view, e.g. rebuild button) > it builds (e.g. re-builds as you name it). But it doesn't use the new settings until I close C::B and it asks to save the project and I re-open C::B again.
Title: Re: How to set the build output path for the final executable
Post by: raynebc on August 25, 2016, 06:41:47 pm
When I change my project's target executable name and hit build, it creates the new executable without having to re-open the IDE or rebuilding the entire project.  This is working as intended.  Why don't you list all the build options you've changed?  It's likely that some of them require a rebuild of the project to take effect, and that would almost certainly be by design.