"Cross Settings" Path Referencing Environment Variable [message #773959] |
Mon, 02 January 2012 19:51 |
Eclipse User |
|
|
|
Hello,
I've only just started using Eclipse (on Fedora x86_64) as part of a large port of Win32 application code (developed under MS Visual Studio 2003). One aspect of this that I've been struggling with is the ability to leverage system environment variables within various project settings. In particular, I'm attempting to leverage a system environment variable in the "Path" parameter of the "Cross Settings" project category.
I've attempted to look all over for further information on this (Google, CDT site+forums, CDT+Eclipse documentation, etc.), but haven't been able to get this working. I'd like to define the "Path" setting in "Cross Settings" as follows:
/usr/local/vendor/toolchains/$(TOOLCHAIN_VERSION)
I can tell that this doesn't work because the resulting build is unable to find the compiler. Indeed, the project's "Environment" properties have an un-expanded value for this variable in its "PATH" variable. If I use the absolute path (e.g., /usr/local/vendor/toolchains/2_0_0) the build works fine (and the "PATH" variable in the project's "Environment" properties is updated correctly).
I've tried a bunch of variants for the variable reference syntax, including: $TOOLCHAIN_VERSION, $(TOOLCHAIN_VERSION), ${TOOLCHAIN_VERSION}, ${env_var:TOOLCHAIN_VERSION}, $(env_var:TOOLCHAIN_VERSION), etc. and none of these work (the "PATH" variable is always unexpanded and the compiler is never found in these cases).
How can I properly reference this system/user environment variable? BTW, I'd like to configure all of our projects this way as opposed to adding the toolchain to the system PATH (i.e., before invocation of Eclipse), because this way Eclipse automatically updates things like the "Paths and Symbols" settings.
Does anyone have any ideas/suggestions? Is this just a bug (in either Eclipse proper or the CDT)?
Thanks,
-David
|
|
|
Powered by
FUDForum. Page generated in 0.04734 seconds