It was totally version related. I needed to build the software in each build environment in 3 versions of each of 3 OSes, 2 Qt versions, 2 boost versions, etc.. Each of these libraries pulled in more libraries that needed to be build, as well as needed things like Perl, Python, CMake, etc.. on each platform for building the code. Often times the latest release would not build on older platforms, so I had to find the older releases, then these had to pull in a working older make or cmake or perl, etc.... It really was a versioning hell, that took about 3 weeks to get every build platform up and running.
I wouldn't call it non-productive. I don't consider productivity is only measured in coding time, but it certainly was tedious work. Once it was done, software development and maintenance was a breeze on each platform after that.
Also, I don't think this is the fault of the language (C or C++) because the same thing can happen in any language. New versions don't compile on older tools, older libraries can't be found online anymore, or they don't build with newer tools, and need to be ported, stuff like that.
It was no joy, that's for sure

but once it was all built, the many libraries interoperated just fine on all the platform flavours and versions.