Reputation: 4115
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.
Upvotes: 4
Views: 8845
Reputation: 926
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.
Upvotes: 1
Reputation: 71555
The Red Hat Developer Toolset provides C++11 support.
(Indeed, I suspect this is the primary reason for its existence.)
Upvotes: 8
Reputation: 106589
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.
Upvotes: 0