Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » set env.variable based on architecture
set env.variable based on architecture [message #1037275] Tue, 09 April 2013 11:15
Tamas Csabina is currently offline Tamas CsabinaFriend
Messages: 28
Registered: November 2012
Junior Member

I have a project where I need to set an env.variable, but the content if it should be different if this runs on x64 or if it runs on x32 (both Windows by the way).

Let`s say:
on x64 bit my env.variable contains:
MYUTILS="c:\program files (x86)\tools\bin"

on x32 bit my env.variable contains:
MYUTILS="c:\program files\tools\bin"

In a simple batch file I can do this easily (as PROGRAMFILES(x86) is a env.variable only defined on x64bit windows systems):
IF "%PROGRAMFILES(x86)%"=="" (SET progfiles=%PROGRAMFILES%) ELSE SET progfiles=%PROGRAMFILES(x86)%
SET MYUTILS="%progfiles%\tools\bin"

But how can I do this in an Eclipse project (yes, it has to be stored in the project), by using the C/C++ Build->Environment menu?
Or alternatively I could use any other project option.
Previous Topic:Linker Problems
Next Topic:Segmentation faults in the console
Goto Forum:

Current Time: Sun May 27 18:02:19 GMT 2018

Powered by FUDForum. Page generated in 0.01280 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top