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 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 in ~/.bashrc.
Using Eclipse terminal view plugin ELT (code.google.com/p/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. stackoverflow.com/questions/17360737/eclipse-cdt-launched-from-gui-does-not-read-path-in-bashrc-bash-profile-p