Intro
If you to want define relative locations to your project directory for file locations; use project name in your build artifact; and various environment variables, eclipse provides a list of variables that you can use.
Where to find
Open eclipse
- Load your project
- In the menu bar -> Properties
- In the properties window -> C/C++ Build
- Under C/C++ Build -> Build variables
- Tick the box “Show system variables”
Adding custom variables
You can also add custom variables to be used in your build. Do this by clicking add in the same window (i.e. Build variables)
How to use them
You can use build variables in your settings (e.g. file-paths, library-paths) surrounding them in ${build-variable}, where build-variable is the variable you want to use.
Example:
${ProDirPath}