views:

205

answers:

6

Hello I am putting together a tool chain on my windows Box for Cross Platform C++ Development. I plan on using Boost.Build for building and Boost::Test for unit testing. I will be using Mercurial for my VCS because I can just throw the repo on my external HD and then pull it to either my windows or linux partition. The main thing standing in my way is editor compiler/debugger. Anyone have any suggestions?

With Boost.Build I can technically build with whatever compilers it supports easily. That means MSVC on windows and GCC on linux by using the same script with a flag.

+4  A: 

Code::Blocks is a free, open source, cross platform C++ IDE. It supports the MS and GCC compilers, among others.

anon
+3  A: 

you can use gcc/g++ on windows as well. as for debuggers: gdb and ddd might be in cygwin. editor: vim (beware: it's really a programmable editor, not an IDE).

just somebody
Would it be hard to learn the more advanced features I usually only use it for quick edits of config files.
blewisjr
the answer depends on what's a "more advanced feature". but no, there's nothing *hard* about any part of vim, but you'll keep forgetting stuff you seldom use, of course.
just somebody
+6  A: 

Qt Creator using MinGW on Windows and the GNU compiler on Linux. That's what I use and it works perfectly well. Note that you don't have to use Qt when developing with Qt Creator.

milan1612
+3  A: 

The main thing standing in my way is editor compiler/debugger. Anyone have any suggestions?

Yes: Qt Creator as one download and install will satisfy your three requests -- pick the 'LGPL' license route and download and install the SDK which even installs gcc, g++, ... for you. The integrated debugger is very good, and you get cross-platform behavior from both your code and your tools.

Dirk Eddelbuettel
Does QT Creator install the GCC toolset on windows as well?
blewisjr
Yes, _if_ you pick the SDK -- that's why it is 280mb. But it is _easy_ and _convenient_ as a single download --- and it all works. Of course, you can also do everything in components but that is more work to set up and tedious on Windows as there is no apt-get there :)
Dirk Eddelbuettel
yes apt is that amazing :P
blewisjr
+1  A: 

Vim, gdb, gcc/g++, makefile - you can use them on both - Windows and Unix :)

Yet another vote for Code Blocks or Qt Creator.

There are commercial tools too: beside Visual Studio there are MagicC++ (IDE), debuggers like TotalView, Allinea, Zero-bugs, UndoDB ... if you want to stay with VStudio check these VSBridge and WinGDB.

Anyway you can always use MSVC on Windows and other tools on Unix (gdb/DDD for debugging, vim/emacs for edition) - I've worked in this way a lot of years. Common environment for all platforms is nice, but sometimes it is very hard (almost impossible) to "force" it in company (especially big-company) ;-)

Dominic.wig
+5  A: 

May I suggest CMake on Windows and Linux as you can generate native Visual Studio projects as well as Eclipse CDT projects and plain-old makefiles.

If you are targeting multiple platforms, but find yourself primarily developing on a single platform, I highly recommend a continuous build/integration system to ensure a check-in for one platform does not break the build on the others.

Kassini
Yes CMake is a definite option here. I was actually just looking at it. That continuous build system is exactly what I was hoping to pull off more or less manually. I wanted to be able to pull from the repo and build on the other os to make sure it did not break. My main issue is whether or not I want to develop using project files from a IDE or not to begin with. If I develop with something like vim and build with make files via the command line and debug the same way it seems easier.
blewisjr
The Only real question here is how do you start up the project and lay it out in the vcs etc...
blewisjr
+1 I'd recommend CruiseControl (http://cruisecontrol.sourceforge.net/) for continuous integration. Personally I'd suggest using a VM or a separate box rather than cross-development. The continuous integration will automate the platform builds and can even possibly run the tests and report results (by e-mail). A VM with native tools is as cheap to less exopensive that cross-development.
Clifford