views:

710

answers:

7

I have a C++ project that has to build on Linux but I don't have a Linux machine set up to run any kind of GUI (they all have no monitors). So the question is, can I use eclipse to develop via a file share and build via SSH? I've been doing this and aside from putting lots of ware on alt+tab the only problem seems to be that auto-complete doesn't work right. Based on the error messages I'm getting, I think this is a result of not having either a compiler or include directory hooked up.

Does anyone have any experience working with this type of setup?


People seem to be looking at the "how to make things seamless" bit of my problem. What I'm more interested in is the "how to make Eclipse's editing stuff works as at all" bit.

All the proposed solutions that amount to "get set up to develop on Linux" are worse than the problem (the problem is mostly a nascence issue and I can work around it if I want to)

A: 

While I don't have experience with this exact configuration, your problem seems to call for a build server. Try TeamCity, which has a Linux version and is a great product. You can evaluate it with a limited number of users/build configurations indefinitely.

There's also CruiseControl, which is not as feature-rich, but it's free (beer + speech).

Chris McCall
Setting up a build server for a CS class project... I guess I should have pointed out that it's a *small* project...
BCS
It takes all of maybe twenty minutes to set up. I have one running on my local machine here at work, and I am its only user. Same thing at home for my personal projects.
Chris McCall
Besides, it doesn't address my main problem.
BCS
A: 

I am sure if you are smart enough you could write a plugin for eclipse to do this. I don't believe that it's possible without some programming or scripting. If you can put it on a Samba share on the remote machine you could let Eclipse generate the makefile and then login in remotely to the same machine with ssh and then just run make to run the Makefile that I believe the CDT generates for you. I'm not sure that eclipse won't choke if you don't have mingw or something else on there to trick Eclipse into thinking you want to build with a gcc style compiler. However, you will have trouble trying to debug with this setup though. Probably better just to learn how to write your own simple makefiles; or install cygwin or mingw on your windows machine and use that gcc compiler with eclipse.

dude
A: 

I am using the cpptasks for ant to build a project on different target platforms (Windows and Linux). It uses the platforms compiler (e.g. GCC or the Visual Studio) but tries - unlike the makefile - to keep the whole task as generic as possible. So you can develop on your machine in eclipse on the shared folder and just run the ant target via SSH (it lets you of course set the correct include paths as well) on the Linux remote side.

Daff
+2  A: 

Is there no possibility of using XWindow or VNC and develop on the linux machine? This way you don't need an extra display.

stefaanv
I wish, but no. The box doesn't have a usable desktop env installed.
BCS
Okay, this is clearer than "no monitor". I could suggest using vim or emacs over SSH, but you're looking for an IDE on windows and I have no experience with this setup
stefaanv
No, I'm looking to use **Eclipse** on windows.
BCS
A: 

VMWare and a local copy of linux. Problem solved.

Or coLinux, where you can run linux inside Windows. andLinux is a Ubuntu distro using a coLinux kernel.

Trevor Harrison
+1  A: 

I sometimes use eclipse in windows and build it in a Linux machine over SSH. I have to write a makefile, and then upload them to linux machine and compile.

Yes, auto-complete don't really work, unresolved include....blah blah. To get rid of it, you should use eclipse in a real Linux

and by the way, why not try cygwin/mingw to compile you project under windows. If you can't, good luck install Linux ( sadly, but it's the best way to improve you code performance )

Fu4ny
I can't install Linux on my desktop (not enough room and I can't scrub Windows) and I can't fixup the Linux machine (It's to old to update and I've got to much stuff running to scrub it) and I cant' build a new machine (I'm broke, as in: I go to anything with free food). Oh, well :)
BCS
how about cygwin/mingw, it works fine with me in windows
Fu4ny
A: 

I'm not sure if that's still an issue, just came across this.

If your intent is just to reap the auto-complete benefit of eclipse IDE and not other features (like remote debugging etc), then you should be fine just with the shared disk way as you stated.

The autocomplete probaly stumbles on the lack of system includes from the compiler -- these you may just lift off your target system (is it gcc on your Linux? or just get it off the gcc source tar ball) and put them where your eclipse could pick them up, adjust the include path accordingly.

Obviously, you're looking at compiling/building at your target machine. If you code in plain C++, you may test it under eclipse with your local C++ compiler, though the make files might be somewhat different, but mostly it's just compiler/linker options.

Good luck!

platformNomad