Can't get eclipse to run terminal command on mac - eclipse

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?

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.)

Related

How is the PATH variable defined for the vscode process itself (not the integrated terminal)?

I'm currently using a vscode over a remote ssh connection and cannot figure out how to set the search PATH for the vscode process itself. I have set the PATH for processes run in the terminal in my .bashrc file, which is also sourced from .bash_profile.
In spite of this, vscode complains that pipenv is not on the path although it is visible to my integrated terminal session. In my .bashrc I am loading environment modules to load versions of needed libraries, which get put on the PATH. Since I created my virtualenv using pipenv in the terminal, it knows which python version to use and makes a link to it in the environment definition. Because of the way python virtual environments work, the actual python binary is copied to the virtual environment. And because vscode has hardcoded paths where to look for virtual environments it is able to find the correct version of python that is in use (despite it not seeing it in the PATH).
In addition, hardcoding the path to pipenv using the extension setting python.pipenvPath still produces a "not found" error.
Solutions that I have seen elsewhere suggest launching vscode from the command line so that the process inherits the PATH settings. However, this will not work over a remote connection.

How to run mono commands in msysgit?

I am having trouble running mono CLI commands inside the msysgit console. It works fine in the windows command prompt added by the Mono installer. I have paid attention to the path env variable in the mono command prompt and added C:\Program Files (x86)\Mono\bin\; to the beginning of my system path (and restarted msysgit).
I am getting the following error when trying to run xbuild:
/c/Program Files (x86)/Mono/bin/xbuild: line 2: cygpath: command not found Cannot open assembly 'xbuild.exe': No such file or directory.
What am I missing from msysgit to help mono's CLI tools work better?
Mono for windows is built with cygwin + mingw (see Mono compile guide).
I'm not sure whether it's fully compatible with msys or not. From the error, I guess there is a problem of path. You may need cygpath.exe in your path from the following link. You should probably invoke mono either from Cygwin or cmd (through the bat provided files).
Even if mono for windows is compiled with mingw (and thus should not depend on cygwin), from your error, we can see there are still cygwin dependencies.

Batch file in eclipse path variables not found

I want to start a batch-script in my eclipse. (Instructions here: How to run a batch script (.bat file) from eclipse)
In my batch file i need some commands like pear or phing.
I put the path to these commands into my environment variable called PATH.
(Works fine with cmd manually)
After starting the script, I'm getting this error:
'pear' is not recognized as an internal or external command,
operable program or batch file.
If I type pear by hand, it doesn't work either.
You need to restart Eclipse after changing the system environment; environment variable changes requires any process that is already running to be restarted in order for that application to pick up the changes.
Another option might be to put the full path to those commands in the .bat file so that it doesn't rely on the system environment in order to work properly.
Tip: Make sure to close and start eclipse afresh for PATH variable changes to take effect. Using the Restart option in File menu may not help here.

Failing to run command in makefile project in Eclipse

I have a problem when i try to build my makefile project within Eclipse on Linux OS. Whole makefile executes fine except for the last command which is unsimgcr -pd input output. I get an error /bin/bash: unsimgcr: command not found.
The weirdest thing is that if i run make command from linux terminal the makefile executes fine no problems. I think I should set something within Eclipse IDE, but I don't know how and help would be appreciated.
Likely unsimgcr is in your path when you run it from the command line but not in the path when run from eclipse. Either fix the path issues, or put an absolute path to unsimgcr in the make file.

Run, The Command Line and that Path Variable

I'm having a very weird issue with the command line and running Ant. I point the path variable at the location of my Ant bin directory (C:\Ant\bin) and when i go into a command window and type PATH it shows the location in it. But when I go to run Ant by typing "ant" it does nothing and states that it isn't recognized. But when I go to the run window (Windows+R) and type "ant" it runs it.
I have restarted Windows twice and the problem still persists. I am running Windows Vista Ultimate with SP1 installed. I have tried "Running as Administrator" with no difference.
Any one experience anything like this before?
Sometimes you can set a system-wide (or even just personal) Environment Variable and it'll cure it, as opposed to just setting it in your shell.
Go to the Control-panel, then System, then Advanced, and look for the button on Environment Variables. From there, you can follow your nose.
Good luck.
Ant also depends on Java to be on the path. Do you have that?
I would also check to make sure the environment variables ANT_HOME and JAVA_HOME are set up properly in the console.
Is there any chance that the command window you are trying to run Ant in is a different window to the cmd windwo where you set up and verify that its in the path? If the PATH is updated after a cmd window is already open it won't recongnise the change. Not clear if that might be your issue.
If you are in the dir C:\Ant\bin and type "ant" does it recognise it?