简体   繁体   中英

Setting PATH in Makefile run by eclipse

I have a Makefile which runs fine from a bash shell, but fails to run from Eclipse. This is because the path I am setting in my .bash_profile is not getting used.

What is the best way of making this happen? Is there somewhere else I could put the path, to make sure it is invoked in non-interactive shells (which is I assume how eclipse is running make)?

If you are using CDT, you can set environment variables in Project->Properties->C/C++ Build->Environment. But I'm not sure this will achieve the desired effect.

You can also ( if using CDT, and an external builder ) you can set the make program to be /bin/bash make which should pick up your path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM