c++

Cross-compiling C++11 without going mad(der)

C++11 is all the rage these days. It’s got a ton of new features language- and compiler-wise that are aimed towards fixing the many problems that have constantly plagued C++ over the years. It’s not a perfect language, not by a long shot, it’s ridiculously verbose when following best practices and it’s, well, C++. I’m sure I’ll get flamed. C++11 support So how do I cross-compile? * [Setup](#setup) Android iOS

Solving the gcc 4.4 strict aliasing problems

A couple of days ago Jeff Stedfast ran into some problems with gcc 4.4, strict aliasing and optimizations. Being a geeky sort of person, I found the problem really interesting, not only because it shows just how hard it is to write a good, clear standard, even when you’re dealing with highly technical (and supposedly unambiguous) language, but also because I never did “get” the aliasing rules, so it was a nice excuse to read up on the subject.

Binding C++ APIs, the COM way

A couple of days ago, during a routine “aaagh, we still don’t have a nice way to do C# bindings for C++ APIs” discussion, Miguel asked me how hard would it be to leverage COM to bind C++ APIs. I’ve been known to mess around with COM, as when I did Mono.WebBrowser/Gecko C# bindings, but I never did get around to do little test apps to try and streamline the whole process of using COM to bind a C++ API, so I jumped at the chance and got some interesting results.

Now where did I put my type?

Today I ran across an interesting problem while trying to export a function from a dll built in vc++ (2003). I’ve been digging into the mozilla source a lot lately, doing the library to embed mozilla and get our much-needed webcontrol working on Mono, and after a successfull browser window invocation from .net (screenies to come soon) (woohoo), I decided to clean up the code a bit and start doing the functions properly.