Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse CDT launched from GUI does not read $PATH in .bashrc /.bash_profile / .profile on Mac OS X
icon5.gif  Eclipse CDT launched from GUI does not read $PATH in .bashrc /.bash_profile / .profile on Mac OS X [message #1065953] Fri, 28 June 2013 13:21 Go to next message
Firman Azis Rauf is currently offline Firman Azis RaufFriend
Messages: 1
Registered: June 2013
Junior Member
Actually I can workaround the problem by launching Eclipse CDT from the Unix symbolic link. It is just annoying and wonder if it can be fixed to be launched normally like the JDT counterpart.

I am learning SDL and the SDL tutorial says use
`sdl-config --cflags`
in miscellaneous flag in the compiler flag settings. The build console output error message /bin/sh: sdl-config: command not found.

I found Eclipse CDT does not read environment variable settings in ~/.bash_profile or ~/.profile. So I just put
source .profile
in ~/.bashrc.

Using Eclipse terminal view plugin ELT ( I found that now eclipse read that variable. But then again the console says sdl-config is not found.

I put echo $$PATH in prebuild step setting, and CDT now output


which is much shorter than my actual $PATH


Why does CDT ignore environment variables when launched directly from the GUI? and how to fix it? my sdl-config is in usr/local/bin folder.

I put this question in stack overflow as well.
Re: Eclipse CDT launched from GUI does not read $PATH in .bashrc /.bash_profile / .profile on Mac OS [message #1066136 is a reply to message #1065953] Mon, 01 July 2013 08:11 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
.bash_profile is only executed for login shells and ~/.bashrc is executed for non-login shells. They are not executed when you launch a GUI application. I would suggest you modify the environment variables directly in Eclipse.

Before you ask
- search this forum
- see the FAQ
- google
Previous Topic:Including external libraries
Next Topic:Kepler changelog
Goto Forum:

Current Time: Tue Sep 25 08:02:31 GMT 2018

Powered by FUDForum. Page generated in 0.06031 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top