How to migrate codebase to C++11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'd like to ask some questions about codebase migration to C++11. In
the company I work, we have a large C++ codebase, currently C++98. We
recently upgraded GCC to 4.8.3, so at last using C++11 became a
possibility. Our product is built on-, and runs on x86_64 Linux
platform only, so no cross-platform considerations are needed. We also
make use of some third party C++ libraries, that are also C++98. We
build everything from sources (including the 3PPs), so recompilation
is not an issue, and we always deploy all of our built code together
(i.e. no partial upgrades), so backwards compatibility between our
components is also not a problem.

We plan to recompile our own codebase with the -std=c++11 flag, and if
there are any problems, we can rewrite the necessary code parts. And
here comes my question at last :) Do we need to use the -std=c++11
flag also while recompiling the 3PP libraries, or is it enough to use
the same build environment with the same GCC version as used for our
own code? Or more simply put: can we use C++11 code and C++98
libraries together, given that they are compiled with the same
compiler on the same environment, just with different language version
flags?

This is important because unlike our own code, we can't just rewrite
things in 3PP libraries in case there are C++11 compilation issues,
and even if we could, we don't know those libraries well enough to do
so.

Some supplementary info: as far as I remember, we only use dynamically
linked 3PP libraries, but I'm not sure - anyway, I'm interested in
both dynamically- and statically linked cases. I did some research,
but only found info on some ABI incompatibilities in the C++ Standard
Library, and some ABI changes in GCC 3.7.X. And countless similar
topics on various websites, with roughly 50-50% distribution between
"yes it works, no worries" and "lol u mad bro forget it" answers.

Best Regards,
Tamas



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux