Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Story on June 16, 2011, 05:24:54 am

Title: easily copy and edit multiple options in build options?
Post by: Story on June 16, 2011, 05:24:54 am
Sorry I can't think of a simple way to describe this problem. But the problem is that under Project->Build Options, there are a lot of options that have to be entered one by one. For example Link Libraries.

Libraries under linker settings have to be added one by one, and there is no way to easily edit or copy them. (Apart from the Copy All button, which only moves them to another target). For example, suppose I link to a bunch of libraries in a particular directory, but then that directory gets moved. What I want to do is just a simple search replace to update all the directory names. But there's no way to do it. I have to manually click on each one, browse through windows explore to the new location of the library, and then click to accept. For every single library. Obviously this quickly becomes unwieldy and is a huge hassle.

P.S. I figured out one way to do this: manual editing of the project file as xml. However this seems needlessly complicated. Is there any way to get support for something like this inside the C::B gui?
Title: Re: easily copy and edit multiple options in build options?
Post by: oBFusCATed on June 16, 2011, 07:43:59 am
Hm, Do you put library names only in the Link libraries, or you put the full paths?
Aren't you using "Search directory|Linker"?
Have you read about global variables? http://wiki.codeblocks.org/index.php?title=Global_compiler_variables
And last but not least, there is a scripting support for modifying this things...
Title: Re: easily copy and edit multiple options in build options?
Post by: ollydbg on June 16, 2011, 07:52:08 am
If you always use a absolute library path, this could be an issue.

Can you use a short fine name? then only specify the library search path in another tab?

Look at the image below:
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2011-06-16134226.png)