the corner office

a blog, by Colin Pretorius

C++, Windows, and late nights

As I was saying... the joys of C++ on Windows. The easy choice should be VC++. To date I'd used Visual Studio Express 2005. As far as compiler and debugger go it's great and headache-free. The problem is, as a Java developer, you're sooo spoiled by your IDEs that VC++ is a little bit long in the tooth, in comparison. Where's my refactor-rename? Where's my real-time syntax checking? Where's my comment auto-completion? Why is IntelliSense so hit and miss? Why is 'find all references' so clunky? Why can't I F3 an include file? Why can't I link my navigators and editors? Where's my refactor-rename, dammit!

Enter Eclipse CDT. I last used it in 2006, and I used it on my Gentoo box. It was sluggish, but gcc and gdb and all the groovy tools Just Worked, as you would expect on a Linux system. I was rather keen on giving it a bash on Windows.

The problem is that CDT on Windows boils down to one of two choices: cygwin's gcc or MinGW's gcc. Early on I decided to go with MinGW. Opinion on newgroups was that it was the easier and less treacherous option. Alrighty then... if my experience over the past month is anything to go by, I feel really sorry for the poor buggers trying to wire it all up with cygwin. MinGW was tricky enough.

Admittedly, there is Wascana, a free all-in-one package which mostly works, but I couldn't get Wascana and wxWidgets working nicely, and eventually, I just gave up and rolled my own MinGW/MSYS/wxWidgets environment. It took a while to get that working, but work it finally did.

My impressions: CDT is nice. It has a lot of Eclipse goodness, a familiar interface (for a Java dude like me), its managed make tools take a lot of the drudgery out of building projects, and it's a lot faster and more functional than I remember it. The only let-down is the underlying tool chain. MinGW's half-Unix half-Windows schizophrenia is bad enough, but its overall integration into CDT is a pain. On top of that, MinGW is a dodgy old version of gcc that churns out bloated code (like, insane bloated, occasionally), and its debugger is old, spews out all sorts of crap when you least expect it, and is apparently buggy as hell. In short, it's just more pain than the IDE is worth.

I would have tried a pure cygwin setup, but apparently cygwin's debugger doesn't play nicely with CDT either.

So in the end, I've gone back to Visual Studio. I'm pretty sure CDT is going to rock if I go back to spending more time in my Linux partition, but for now, it's VC++. Oh well. I believe VC++ 2008's got refactor-rename...

{2008.04.03 21:44}

« GUI apps

» Review: The Da Vinci Code