c++ - use environment variables in eclipse -
i have a eclipse cdt project using cross gcc toolchain. path of cross compiler has set in toolchain settings: c/c++ build -> settings -> cross settings -> path.
because of sharing project other people, path cross compiler should in environment variable called linux_devkit_path.
i defined linux_devkit_path environment variable , used "${linux_devkit_path}/bin" in c/c++ build -> settings -> cross settings -> path field. settings compiler couldn't found. tried used c/c++ build -> environment -> select... add variable list. environment variable found , appears in list origin user: config.
in eclipse can set environment variables , values use when application runs.
to set environment variables:
- in c/c++ projects view, select project.
- click run > run or run > debug.
- in configurations box, expand c/c++ local.
- select run or debug configuration.
- click environment tab..
- do 1 of following:
- to create new environment variable, click new.
- to import environment variable, click import.
- to edit existing environment variable, select item list , click edit.
- to remove existing environment variable, select item list , click remove.
- type name in name box.
- type value in value box.
- click run or following, required:
to specify execution arguments application uses , specify working directory run configuration, see specifying execution arguments. select debugger use when debugging application, see selecting debugger specify location of source files used when debugging c or c++ application, see specifying location of source files specify run configuration stored, how access it, , perspective open when running application, see specifying location of run configuration.
good luck friend.and if post answers question don't forget accept answer.
Comments
Post a Comment