9
votes

Is there a better way to setup Eclipse CDT for local editing and remote building?

I am working on a C++ project that uses GNU make in Linux. The code is under CVS on a Linux server.

When I'm in the lab, I use Eclipse CDT on a Linux-x64 PC. The project is built on a Linux-x86 PC. All the computers in the lab (including the CVS server) have NFS mounts.

When I'm at home, I use Eclipse CDT on a Windows 7 PC. The Windows PC connects to the Linux CVS server via SSH tunnel. To edit source, I rsync the C++ project under the Linux Eclipse workspace back to my Windows Eclipse workspace. (I can also do a remote CVS checkout on the Windows PC.) To build from home, I use a custom build command that

  1. SSH's to the Linux-x86 PC,
  2. rsync's the C++ project from my Windows Eclipse workspace to my Linux Eclipse workspace,
  3. and then runs make on the Liunx-x86 PC, specifying the correct path for the Makefile.

In order to go back and forth between lab and home without committing my changes to CVS every time, I use rsync. When I transition from lab to home, I rsync sources to my Windows Eclipse workspace. When I build from home, the sources get rsync'd back to the Linux Eclipse workspace.

Is there a better, less wonky way to do this?

(I'm NOT interested in remote debugging.)

5

5 Answers

3
votes

Netbeans has good support for this. I've tried to get it working in Eclipse, but Netbeans was much easier with built in support.

0
votes

One solution is to use Eclipse RSE (Remote System Explorer). It allows to "mount" a remote subfolder directly into the workspace (via FTP or SSH). CDT has some issues with the virtual file system used by RSE, but it ... well, more or less works.

There's some discussion on that on my question:

Work on a remote project with Eclipse via SSH

0
votes

I need to do similar things, and I took a look at Synchronized Projects: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.ptp.doc.user%2Fhtml%2FlocalVsRemote.html

Synchronized projects support multiple build configurations, so the build can happen either locally or on one or more remote systems. The user can select which system will be used to build the project. A launch configuration can then be created to to run the application on the target machine.

To build on remote machine, follow Working with a Synchronized Project: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.ptp.doc.user%2Fhtml%2Fsync.html

0
votes

How about using vnc and remotely logging in, using eclipse ON your unix box in the lab? The only thing to go across the link is your editing, and vnc is pretty efficient about that.

0
votes

This post seems quite old. But in case this might help somebody, I'd like to post a solution that works both on Linux and windows machines, which is really easy.

Now there is an Eclipse parallel version and you can just install that and change few lines in your remote machine's bash_profile to load few git functions. I'm even connecting from behind a gateway which is a little tricky. It is easier without. See this link: http://umayanganie.blogspot.com/2017/05/build-debug-cc-projects-via-remote.html