Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Issues with r.8093

<< < (2/2)

MortenMacFly:

--- Quote from: ironhead on July 08, 2012, 04:02:41 pm ---If I understand correctly, you're saying I need to set the 'include' variable to '$(#boost.base)'?
--- End quote ---
Yes.


--- Quote from: ironhead on July 08, 2012, 04:02:41 pm ---How come I don't need to do this for 'wx'?
--- End quote ---
Because wxWidgets has an "include" and "lib" folder named as the fields of the GCV. GCV's are replaced like the field-names by default, if the entry is empty. So... by default for boost this means:

--- Code: ---$(#boost.include) = [Boost base Path]\include
$(#boost.lib) = [Boost base path]\lib
--- End code ---
...ans so on - which is incorrect for boost as you see.
Setting the field of $(#boost.include) to $(#boost.base) will resolve the boost GCV in way, that the includes will work, as they are not under [Boost base path]\include, but directly under [Boost base path].

That's what the concept of GCV's is for in the end and what differs them from environment / custom variables.

Note that using plain $(#boost) as compiler include path is actually not precisely correct. That's why I've changed it.

Edit: See also here:
http://wiki.codeblocks.org/index.php?title=Global_compiler_variables

oBFusCATed:
off: Maybe I've to read the whole page for global variables as I've learned another useful thing...

MortenMacFly:

--- Quote from: oBFusCATed on July 08, 2012, 04:26:24 pm ---off: Maybe I've to read the whole page for global variables as I've learned another useful thing...

--- End quote ---
Well this concept is very powerful and unique for our IDE. Unfortunately it seems also well hidden and not obvious in the first place.

When we didn't have the platform flag I was using the GCV's to become a cross platform project file:
I created a "platform" GCV and in its "custom fields" I entered something like "lib_ext = .dll" and "app_ext = .exe" for Windows and "lib_ext = .so" and "app_ext = (empty)" for Linux (syntax here "field_name = value"). Then for the projects' target's output name I setup "mylib$(#platform.lib_ext)" and "myapp$(#platform.app_ext)" which was working fine once setup per platform. Luckily meanwhile this is even simpler, but maybe another nice use-case for GCV's.

Navigation

[0] Message Index

[*] Previous page

Go to full version