Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: johne53 on November 15, 2009, 11:07:53 am

Title: Correct syntax for built-in fields
Post by: johne53 on November 15, 2009, 11:07:53 am
Suppose I've defined a global variable (within the C::B IDE) and called it "my_proj". I've defined its 'base' property to be "F:\My_Project". The setup dialog for this variable contains several other  "built-in field" properties such as "lib", "obj" and "include". Suppose I define "lib" to be "F:\My_Project\libs".

I can use the global variable my_proj (well, technically, my_proj:base) by referring to it in my project as $(#my_proj)

But what is the syntax if I want to use "F:\My_project\libs" (in other words my_proj:lib)?
Title: Re: Correct syntax for built-in fields
Post by: Vuki on November 15, 2009, 12:36:45 pm
But what is the syntax if I want to use "F:\My_project\libs" (in other words my_proj:lib)?

$(#my_proj.lib)

It's in the Wiki, look there: http://wiki.codeblocks.org/index.php?title=Global_compiler_variables (http://wiki.codeblocks.org/index.php?title=Global_compiler_variables)
Title: Re: Correct syntax for built-in fields
Post by: johne53 on November 15, 2009, 04:35:57 pm
Yes, it works. Thanks Vuki.