Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

cmake does not find std::nullptr_t


I'm trying to build a library with the Intel compiler using cmake. This library makes use of the std::nullptr_t introduced with C++11. So the cmake scripts check for '-std=c++11' which is present in the Intel 15 compiler.

However the std::nullptr_t is not supported by the system gcc (4.3.x) resulting in the following error message: "Your compiler supports the 'nullptr' keyword, but not the type std::nullptr_t.You are using an Intel compiler, where this error is typically caused by an outdated underlying system GCC."

When I load a newer gcc (5.1.0) using the modules environment the sample code compiles when I compile the extracted code by hand. But inside the cmake script it does not. The Intel compiler offers command line options for the gcc paths, but the '-cxxlibs=...' expects a base dir which includes bin, lib64, include and so on. The gcc 5.1.0 installed by the vendor however does not follow this scheme.

This is the test code from the cmake script:

#include <cstddef>

int main(void)
  std::nullptr_t npt = nullptr;
  return 0;


0 Kudos
0 Replies