upgrading boost version - c++

I'm using RHEL 5.3, shipped with gcc 4.1.2 and boost 1.33.
So, there's no boost::unorded_map, no make_shared() factory function to create boost::shared_ptr and other features available in newer releases of boost.
Is there're a newer version of boost compatible with the version of gcc?
If yes, how the upgrade is performed?

Download the latest version (1.43.0) of the Boost libraries from the Boost website and follow the steps in the getting started guide, which explains how to build Boost on a number of platforms, including Linux.

Simply download and install the newest version; it will adapt itself automatically to your compiler.

Sure, just download the latest source from link text. If you are only using header only libraries, it just needs to be unpacked. If you are using one of a handful that require a library, you will need to build those.

Related

MinGW: How to upgrade GCC/G++ to version 5 on Windows?

I have MinGW installed on my computer and I just found out that my GCC/G++ has problems compiling newer C++ standards. So I want to upgrade from 4.8.1-4 to the latest version (5.3 at the time of writing this).
The MinGW Installation Manager doesn't install a newer version than 4.8.1-4, so I'll probably have to do it somewhat manually. But how? I heard that Cygwin might be able to do it, but I think MinGW and Cygwin would interfere with each other (environment variables). So I'd rather not do it that way.
MSYS2 might be a good answer to your needs. It has cygwin-like environment together with mingw3/mingw64 environment. And GCC version is 5.3
Link: https://msys2.github.io/

Can I target older linux with newer gcc/clang? C++

Right now I compile my C++ software on a certain old version of linux (SLED 10) using the provided gcc and it can run on most newer versions as they have a newer glibc. Problem is, that old gcc doesn't support C++11 and I'd really like to use the new features.
Now I have some ideas, but I'm sure others have the same need. What's actually worked for you?
Ideas:
Build on a newer system, static link to newer glibc. (Not possible, right?)
Build on a newer system, compile and link against an older glibc.
Build on an older system using an updated gcc, link against older glibc.
Build on a newer system, dynamic link to newer glibc, set RPath and provide our glibc with installer.
As a bonus, my software also support plugins and has an SDK. I'd really prefer that my customers could compile against my libraries without a huge hassle.
Thanks in advance. Ideas welcome, proven solutions preferred.
Build with the newer gcc. Either install the new compiler on the old machine or comile on your new machine and install the necessary dynamic libraries on the old machine.
Note that multiple versions of libc (and also libstdc++) are supported on a single machine since they are typically versioned (i.e. libc.so.5, libc.so.6, etc)

How to install C++11 C++0x header files on Redhat Enterprise

I moved my application to another Linux box, after compilation, it returns an error saying
#include <atomic>
can not be resolved.
I guess the new GNU C++11 header files / libraries are not installed on new machine.
My question is how can I install them?
I am running on Redhat Enterprise, so yum install ?
Thanks.
The Red Hat Developer Toolset provides C++11 support.
(Indeed, I suspect this is the primary reason for its existence.)
The include under the version of gcc that comes with RHEL 6 is:
#include <cstdatomic>
See Runtime Library (libstdc++) section of gcc 4.4 releaste notes.
EDIT: This answer is not fully correct, because cstdatomic is the C11 file and not the C++11 one. For full C++ support in RHEL 6, the devtoolset should be used.
Looks like you'll need to install an up to date version of GCC yourself; RHEL (at least as of 6.x) does not have a version of GCC supporting C++0x in it's repositories. You can build recent versions of GCC by following GCC's installation instructions, which are distribution-neutral.
You may also be able to use a package from a more recent Fedora release, which generally contains more "bleeding edge" software than that available in RHEL.

Where i can download gcc and glib for Cygwin?

I'm writting application for embedded system. Where i can download gcc version 3.4.3 with glib version 2.3.4 for Cygwin ?
I have download cygwin-gcc-3.3.6-glibc-2.3.2-linux.tar.bz2 but this version isn't suitable for me...
Sometimes linux distributions have a 'compat' packages which make older libraries available. Try searching cygwin for the version of libstdc++ you're looking for.

What's the latest version of Boost compatible with VC++6?

What is the latest version of the Boost library that is compatible with Microsoft Visual C++ 6? And can you provide a link to download it directly?
The Downloads link at http://www.boost.org only gives a download for version 1.36.0, and the documentation for that version lists Visual C++ 7.1 as the lowest version of Microsoft compiler tested. Do they purge out downloads for older versions?
Boost 1.34.1 has been tested with vc6. The old versions are still available.
You can get all older versions from the boost download page on SourceForge.
The compilers used for regression tests are probably buried somewhere on the boost.org website.
It's worth noting that Boost doesn't actively not support VC6 either. Most of the boost libs probably still work with VC6 (they haven't stripped out the VC6 compatibility code, as far as I know)
So you could just try 1.36.1 and see how far you get.