Author Topic: Correct syntax for built-in fields  (Read 4678 times)

Offline johne53

  • Regular
  • ***
  • Posts: 253
Correct syntax for built-in fields
« 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)?

Offline Vuki

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: Correct syntax for built-in fields
« Reply #1 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

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Correct syntax for built-in fields
« Reply #2 on: November 15, 2009, 04:35:57 pm »
Yes, it works. Thanks Vuki.