C++ and OS X

I do a lot of C++ coding. Over the past few years I've seen Eclipse mature into a full blown C++ IDE and I use it religiously. Partly because it's portable: any operating system I am on has a version of Eclipse available to it. Not that I don't like XCode. I just don't do enough OS X specific application development to make it my full time IDE.

Today I was in the process of creating an STL compliant Graph container. Everything was going well. I did my testing and then began the conversion to a template -- and then all heck broke loose. I spent over 4 hours troubleshooting different linking errors. Since none of my ideas worked, I thought to myself "Why don't I try using XCode?" I remember during the Leopard upgrade that there was an option to upgrade XCode. Of course, I neglected to do so as I didn't really need it.

Usually XCode comes up with a quick search in QuickSilver, but it didn't today. This forced me to check the Developer directory (which wasn't complete), so I downloaded the latest XCode and installed it. I'm still not sure why, but my linking problems corrected themselves and my container (mostly) works.

I'm not much of a systems internals guy, buy my guess as to why this happened is because of Leopard's UNIX compliance. For those not in the know, Leopard is UNIX certified. Essentially this means that all *nix code will execute/compile correctly in OS X. This is important as it bridges a development gap: allowing for a single platform to develop *nix, OS X, and Windows applications (using boot camp or some virtualization software). In fact, this is what first inspired me to invest in my MacBook Pro.

Moral of the story: if you develop in C++ and haven't upgraded XCode -- DO IT!!!! It may save you hours of headaches in the future.

xcode picture

 

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options