views:

208

answers:

6

Hi there,

I have to program a C/C++ application. I have windows and linux (ubuntu 9.04) in my machine, and can program in both of them (via gcc/code blocks/vim,etc). The problem is that the executable is going to be run in a Unix (not linux) machine (will have access to it in about 20 days).

My Team Leader doesn´t want all of the code to be programmed in linux - unix. So, some of it will have to be developed in windows (and then many prayers will follow so that nothing bad happens).

The best thing i´ve come up with is to program remotely on the server, from windows and linux, so every programmer (only me for the next 2 weeks) is sort of happy. In windows, I think i´m stuck with putty, but is there any alternative on linux, rather than ssh-vim? .

I read this Remote debugging with Eclipse CDT but it didn´t bring much light on the subject. At least not much hope.

There is another issue. I don´t consider C/C++ to be a portable language. At least for real programs. Sure it compiles, but many issues will arise, even with boost / stl. I haven´t taken a careful look to the code, but still, how wrong a I?

Any tips will be greatly appreciated. Thanks in advance.

+1  A: 

You could ssh w/ xming for a gui ide/editor that is on the remote machine.

If all the code is one the remote machine and compiled there, don't you have to worry about developers trying to work with the same resources? Also might the machine/network not be able to handle multiple ssh connections if you're using xming?

Matthew
yes, the network is a concern. Unfortunately I wont know until I test it.
Tom
+1  A: 

If you can convince your system administrator to install the libraries (an X server is not required), you can use X forwarding with SSH, which will allow you to execute X apps remotely and have them come up on your local server. If you're using Linux locally, you probably have X running already, and if you are using Windows, you can use the Xming server (with a little configuration to get it to accept remote connections). For debugging, if you need a separate shell, just set another instance of SSH going and perform debugging from another process.

As for portability, it depends on what you are trying to do. If all you want is a simple console-based application, you shouldn't run into any major portability concerns. If you are using more complex code, portability depends heavily on two things. The first is the choice of libraries - sure, you can run applications written for Win32 on Linux with Wine or actually compile them with Winelib, but it's not a pleasant experience. If you choose something more portable like Qt or gtkmm, you'll have a much easier time of things. Likewise for filesystem code - using a library like Boost.Filesystem will make things significantly simpler. The second thing that makes a big difference for portability is to follow the documentation. It's hard to stress this enough - many things that you do incorrectly will have varied results on different platforms, especially if you are using libraries that don't do checks (note: I highly recommend checking code against debug standard libraries for this reason). I once spent nearly a weak tracking down a portability bug that arose because someone didn't read the docs and was passing an invalid parameter.

coppro
+1  A: 

If you want to use remote desktop like facility try VNC www.realvnc.com or in case its just a remote login Hummingbird, EXceed could help

subbul
+1  A: 

You might want to check the wingdb visual studio extension.

steve
I'll check it, but I dont have visual studio :)
Tom
+1  A: 

Not sure if this will help, but take a peek at sshfs. I haven't had a need to use it myself, but I have read others use it to access remote files and directories via ssh and work on the files locally. I presume you could access your remote home directory via sshfs and then use your local tools to work on the source files. I would very interested in knowing if this works out, so please post back if you give it a shot.

I currently use sshfs to work remotely, but with vim as an ide. I will take a deeper look. Thanks
Tom
A: 

I use No Machine NX, which gives you the entire desktop of the remote machine. It also has a Windows client. I work remotely from home on Fridays, so I'm using it right now. You'll have to install it on the remote machine, and then install a client on your Windows or Linux machine.

Scottie T