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
/usr/bin:/bin:/usr/sbin:/sbin
which is much shorter than my actual $PATH
/usr/hla:/opt/local/bin:/opt/local/sbin:/Users/firman/.rvm/gems/jruby-1.7.3/bin:/Users/firman/.rvm/gems/jruby-1.7.3@global/bin:/Users/firman/.rvm/rubies/jruby-1.7.3/bin:/Users/firman/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
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