Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Path variables in Eclipse

📅 2015-Feb-12 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ eclipse, path variable ⬩ 📚 Archive

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


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧