C++/en: Difference between revisions

Jump to navigation Jump to search
109 bytes removed ,  6 years ago
Updating to match new version of source page
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 31: Line 31:
=New to C++ or need an update?=
=New to C++ or need an update?=


If you are new to C++ or need an update then start by checking out the ISO C++ advocacy site's [https://isocpp.org/get-started Get Started] page --especially its recommended books. All of these books are excellent. (FYI, the Pearson/Addison-Wesley publications cited are available as watermarked eBooks without DRM from [http://www.informit.com/ www.informit.com] which is run by Pearson.)
If you are new to C++ or need an update then start by checking out the ISO C++ advocacy site's [https://isocpp.org/get-started Get Started] page --especially its recommended books. All of these books are excellent.


A book that specifically and only covers concurrency in C++11 (i.e., threads, atomics, condition variables, etc.) is published by Manning, [https://www.manning.com/books/c-plus-plus-concurrency-in-action C++ Concurrency in Action: Practical Multithreading].
A book that specifically and only covers concurrency in C++11 (i.e., threads, atomics, condition variables, etc.) is published by Manning, [https://www.manning.com/books/c-plus-plus-concurrency-in-action C++ Concurrency in Action: Practical Multithreading].
Line 49: Line 49:


====Linking with older previously compiled binaries====
====Linking with older previously compiled binaries====
The transition from GCC version 4.9 to version 5.1 introduced a major change to its ABI. If all source code including all dependent libraries is recompiled using the same version of the compiler then there will be no issues. If different compilers are used, the ABI change may cause linking to fail. The latter is likely to occur if you are linking to precompiled libraries provided in a vendor's product. If this occurs, you can use GCC's [https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html Dual ABI] feature to tell GCC to use the old ABI in order for your application to link properly with those legacy libraries, e.g., you would pass <code>-D_GLIBCXX_USE_CXX11_ABI=0</code> to GCC if using GCC v5.1 or higher to link to libraries built using the older ABI.
The transition from GCC version 4.9 to version 5.1 introduced a major change to its ABI. If all source code including all dependent libraries is recompiled using the same version of the compiler then there will be no issues. If different compilers are used, the ABI change may cause linking to fail. The latter is likely to occur if you are linking to precompiled libraries provided in a vendor's product. If this occurs, you can use GCC's Dual ABI<ref>Free Software Foundation. The GNU C++ Library, Chapter 3. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html</ref> feature to tell GCC to use the old ABI in order for your application to link properly with those legacy libraries, e.g., you would pass <code>-D_GLIBCXX_USE_CXX11_ABI=0</code> to GCC if using GCC v5.1 or higher to link to libraries built using the older ABI.


We've provided an example of how the ABI is affected by various GCC command-line options here: [[GCC C++ Dual ABI]].
We've provided an example of how the ABI is affected by various GCC command-line options here: [[GCC C++ Dual ABI]].
38,760

edits

Navigation menu