User forums > General (but related to Code::Blocks)

Environment Variables

<< < (2/3) > >>

mandrav:

--- Quote ---1. Does CB currently support using environment variables as part of the include/link paths (in terms of using such a path, not in terms of specifying it - I know the latter is not suported through the IDE (right?)).
--- End quote ---

This feature was added last week. You can use environment variables anywhere in compiler settings.


--- Quote ---2. If the answer to 1 is positive, is there a cross-platform syntax to specify the environment variables?

3. What is the syntax to specify the environment variables (if there is one)?
--- End quote ---

You can use any of these forms, no matter what platform you work on:

--- Code: ---$SOMEVAR
$(SOMEVAR)
${SOMEVAR}
%SOMEVAR%
--- End code ---


Yiannis.

darklordsatan:
Yiannis, where exactly, I cant seem to make the PATH env variable to work (I use it inside my app, but I specify some values for it in custom variables and more options in compiler settings but nothing happens)

mandrav:
Maybe I wasn't clear enough:
You cannot set environment variables, only use (aka read) them...
It's not difficult to set env vars too, but what's the point? They 'll only be valid while C::B is running...

[EDIT]: we are talking about the CVS version, right?

Yiannis.

darklordsatan:
Oh! I get what you mean... and yes, its cvs were talking about

mandrav:
Well, now that we were talking about it, I 've found a bug in the implementation that would allow env vars only in global compiler options.
I 'm fixing it now and I 'm also adding the ability to set env vars :)

Yiannis.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version