Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

cmake does not find std::nullptr_t

$
0
0

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;
}

 


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>