Path variables in Eclipse

Path variables of a Eclipse C++ project
Path variables of a Eclipse C++ project

Path variables are variable names defined by Eclipse to make it easy to refer to paths used by Eclipse or paths related to a project. For example, the path variable WORKSPACE_LOC holds the value of the workspace path. These variables make it easy to specify paths in the configuration of a project. You can refer to the value of a path variable using the syntax ${SOME_PATH_VAR}. You can specify paths relative to this, for example: ${WORKSPACE_LOC}/some_dir_name/foo_binary.

The list of path variables of a project and their values can be viewed in Properties -> Resource -> Linked Resources -> Path Variables. In this dialog, you will usually find some path variables already set: ECLIPSE_HOME, PARENT_LOC, PROJECT_LOC and WORKSPACE_LOC.

You can also add other path variables using this dialog. However, I found that I could not actually use these variables for anything useful in the project.

Tried with: Eclipse Luna 4.4.1 and Ubuntu 14.04

3 thoughts on “Path variables in Eclipse”

  1. I had the same problem ,
    – changed project build configuration to ( Release )
    – enclose the path inside double quotes like this :
    if your path has spaces
    * thanks for the STM32 GNU tool chain post🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s