C++ – How to build a c++ project on a remote computer in Eclipse


I have a Windows pc with Eclipse Ganymede installed, and a Linux pc where my C++ project files are located. I use Eclipse to edit the files through SMB, and would like to build the project using Eclipse as well.
Currently I connect using putty to my linux machine, and run ./make from the appropriate directory. How would I run the same command within Eclipse and see the results in it? I have installed the RSE plugin, but still can't grasp how to do so.

Just to made myself clear – I can use VNC to work on Eclipse that is installed on my linux machine, but I prefer not do so. Eclipse through VNC is slow and not as responsive as the Eclipse installed on my windows machine.


Best Solution

I was in a similar situation, developing in a windows workstation, compiling in a linux server. This is what I ended doing:

  1. Setup a passwordless login to the compiler server with putty, for example you can follow this tutorial.
  2. Create a login session with putty, make sure that in Connections/SSH/Auth is pointing to your private key.
  3. Modify eclipse make command to plink.exe -load "saved_session" make -C /remote/path/project (This setting is in Project/Properties/C++Build/Builder Settings/Build command). You can automate this with a batch/shell file if you have to pass more parameters and/or your setup is more complex.

If you have stored a passphrase with your private key then you can use pageant.exe to load your key only once, so you dont have to type your passphrase every time.