开发者

Tools for Unix <-> Windows C++ development

I am doing some C++ cross development - been doing that for a while on Windows and recently started on Unix.

I suppose what I am after is to simplify Unix development experience - I have a local windows box I do development on, and a remote Solaris box which I use to compile and test code on unix environment.

What I do now - I develop, compiled and test code on Windows (VC++) and once it is done, I move code to Solaris box using Filezilla over SSH. I also use Putty to connect to Solaris box and execute shell commands.

Since I am quite new to unix development - I suppose what I do is by开发者_Python百科 far not optimal and the tools/technics I use not optimal too.

Can you recommend me a better tools - how to move code around more easily and may be a replacement for Putty (which looks quite outdated anyway).

Thanks.


If by any chance you want to run the same C++ IDE on both Windows and Solaris, I recommend taking a look at Code::Blocks. Also, as I suggested to Charles, running an X server on the Windows box gives you a lot more flexibility than running Putty or similar.


Is there any reason that You can't test software on Solaris using Virtual Machine? They can share folders so there is no need to uploading code to remote machine.

Second: use svn or git or mercurial. In one machine You check in your code, on other you checkout plus You have history of changes. No need to use Filezilla over SSH.

edit: Also, I think that it would be good to use cmake (or scons - but I don't used it) to generating build files. For example - cmake generates Makefiles or project files for Your IDE, so You don't need to maintaint few different files that build Your code on different platforms.


You might want to look into Samba, so you can work directly with the Windows file explorer to move files to and from Windows/Unix environments, rather than using FTP.

But for UNIX shell access via Windows, you really can't beat Putty.


I recommend mercurial.


Just use a version control system such as Subversion or Mercurial. I strongly recommend the latter because it's distributed so you don't need to have a server per say and you can work offline. Every time you want to shove your Windows code to the unix machine you just need to do 'hg push' and off you go. To sort out the build you can with good old Make or just use SCons (again I prefer the latter because it comes with the power of Python).

I actually, very recently developed a cross platform project in C++ using wxWidgets and GraphicsMagick. I wrote it all in Mac OS X and then compiled both in Windows and Linux. One thing I'd like to point out is that GCC seems to be more pedantic about compile warnings and errors than Microsoft's compiler so if you grow to like the Unix environment I'd recommend to develop there and then compile in Windows (maybe even using a VMWare image).


Instead of moving your source code around manually, consider using a version control system. Not necessarily a distributed VCS such as git or mercurial, but you should use version control nonetheless.

Sooner or later, you'll need to use a debugger on the Unix machine, and if you prefer using a graphic debugger, you should install a local X server on your Windows machine.


  • IMHO vim is quite good editor ;)
  • gcc, nm, ld for compilation/build/diagnosis
  • makefile for builds
  • gdb as debugger, if you prefer GUI check ddd (if you want to stick with Visual Studio for debugging check www.vsbridge.com or www.wingdb.com - they both depends on gdb as back-end)
  • other commercial debugger for Unixes is TotalView (http://www.roguewave.com/products/totalview.aspx the price is high, although they have their own engine instead of gdb)
  • CVS, SVN as source control

If you want to edit files in VisualStudio you can use e.g. Samba as "transparent file system" ;)

By the way VirtualBox may be very helpful (I debug (Open)Solaris or Linux as VBox machines very frequently).

ps yet another environment you may be interested in is Magic C++ www.magicunix.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜