News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

compiler variables/macros

Started by grahamo, April 18, 2011, 04:25:43 PM

Previous topic - Next topic

grahamo

hi,

I have to migrate about 40 projects to codeblocks. 30 of the projects link against the same libs (amongst others). i would like to be able to define a variable (not an environment variable, but a variable that exists only within codeblocks) that indicates the libs I link against.

e.g. something like;

DEBUG_DOC_LIBS=libdoc.so, libprinter.so, libtoto.so

In each of my 30 projects, I can specify $DEBUG_DOC_LIBS. i want to then use this variable in the project build options -> linker settings -> link libraries box (or probably in the "other linker options" box as I see the former only accepts files as input.

Can anybody tell me how I can define such a variable and use it thus.

Thanks and have a nice day

Graham

stahta01

#1
I suggest you read up on what Code::Blocks targets do before you try to do it the way your described.

If after reading up on targets you still wish to do it the way you said, I suggest reading up on Code::Blocks scripting and see if that does what you want.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

grahamo

thanks for the honest reply :)

have a nice day.

Graham