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 开发者_JS百科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.
精彩评论