4 ms·
I agree. Until recently, at work, I was targeting 3 different versions of gcc (Ubuntu 16, 14 & 12 so I think gcc 4.4-5.4). It's not just an issue of what langua
by hermitdev 9y ago
I agree. Until recently, at work, I was targeting 3 different versions of gcc (Ubuntu 16, 14 & 12 so I think gcc 4.4-5.4). It's not just an issue of what language & library features they support, it's also an issue of which compiler flags to use. Is it --std=c++0x, --std=c++1y, something else?
Toss in there, I also have to compile a subset of libraries for Windows. Even when you use frameworks to isolate yourself from OS nuances, you may still have compatibility issues. Like, using the ACE library. What does the function you pass to ACE_Thread to spawn return? On posix systems, it returns void*. So, if you want to suppress compiler warnings (-Wzero-as-null-pointer-constant), you return nullptr. Oops, now your code breaks on Windows, because ACE_THR_FUNC_RETURN there is a DWORD, and no conversion from nullptr to DWORD. On yet other systems, it returns int. So, how do you have your warning free code on all the systems? Ugh: preprocessor.