NJGUY
NJGUY

Reputation: 2085

Can't get eclipse to run terminal command on mac

I have installed swig on my mac and it works in the console just fine. If I type swig -verison in terminal it spits out the version. Eclipse keeps telling me that it can't find swig. I am using the liquidfun library http://google.github.io/liquidfun/SWIG/html/index.html and it told me to put this export SWIG_BIN=$("which" swig) in .bashrc, which I did. This enviroment variable registers through terminal as well. Eclipse STILL won't grab swig properly. What the hell?

Upvotes: 0

Views: 1254

Answers (1)

Jerry101
Jerry101

Reputation: 13367

Bash reads .bash_profile, .bash_login or .profile. I don't expect the Eclipse process to load such a file (although I could be wrong) nor the SWIG_BIN variable to augment its search path for executables, but if you launch Eclipse from the shell, it should inherit the shell's environment variables.

Try running swig from eclipse using a full absolute path (the one that "which" returns).

The eclipse.ini file can set some startup parameters but perhaps not the path. There might be other eclipse startup files.

Another possibility is to add swig's directory to the path in a login script. (To test that, log out and back in, then start eclipse.)

Upvotes: 2

Related Questions