Wednesday, March 19, 2008

Eclipse does not use User's Environment Variables on Linux

Eclipse + CDT does not pick the environment variables I defined in ~/.bashrc, for example LD_LIBRARY_PATH.

Getaround tried - I changed the eclipse driver file in the same way as firefox uses firefox-bin.

amit@ubuntu:~$ cd /usr/bin
amit@ubuntu:/usr/bin$ sudo mv eclipse eclipse-bin
Password:
amit@ubuntu:/usr/bin$ sudo vim eclipse
amit@ubuntu:/usr/bin$ sudo chmod 755 eclipse

BUT IT DID NOT WORK.

Finally I had to enter environment variables manually into the eclipse CDT dialog.