0

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

BCS
  • 75,627
  • 68
  • 187
  • 294
  • 2
    Not exactly an answer to your question, but could it help that you get a GCC environment for Windows (MinGW or Cygwin) with compiler version that comes as near as possible to your Linux GCC version. So you can use that tool chain to fulfill Eclipse need for std/glibc header files. – mmmmmmmm Aug 27 '09 at 19:15
  • There should be no issue with developing on Windows and building on Linux. I'm not sure how Eclipse's auto-complete works, but are you necessarily tied to it? There are a quite a few good and free C++ IDEs (Visual Studio Express, Qt Creator, Code::Blocks to name a few). – Corey D Aug 27 '09 at 19:52
  • VS+GCC has been an issue in the past and Eclipse is the only other tool I have handy. – BCS Aug 27 '09 at 19:56

7 Answers7

2

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
  • 14,072
  • 2
  • 31
  • 53
  • I wish, but no. The box doesn't have a usable desktop env installed. – BCS Aug 27 '09 at 20:24
  • 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 Aug 28 '09 at 06:55
  • No, I'm looking to use **Eclipse** on windows. – BCS Aug 31 '09 at 04:54
2

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 )

ntcong
  • 800
  • 2
  • 7
  • 16
  • 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 Aug 31 '09 at 04:58
0

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
  • 1,321
  • 2
  • 10
  • 7
0

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
  • 43,734
  • 9
  • 106
  • 120
0

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,744
  • 1
  • 14
  • 20
0

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!

-1

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
  • 10,317
  • 8
  • 49
  • 80
  • Setting up a build server for a CS class project... I guess I should have pointed out that it's a *small* project... – BCS Aug 27 '09 at 19:15
  • 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 Aug 27 '09 at 19:17
  • Besides, it doesn't address my main problem. – BCS Aug 27 '09 at 19:56