Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7839 Discussions

error when using icpc compiling c++


when I using icpc compiling c++, I get lots of errors like as

/usr/local/include/c++/5.2.0/x86_64-unknown-linux-gnu/bits/c++config.h(222): error: expected a type specifier

    inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }



/usr/local/include/c++/5.2.0/iosfwd(147): error: basic_stringbuf is not a template

    typedef basic_stringbuf<char>     stringbuf;



/usr/local/include/c++/5.2.0/iosfwd(150): error: basic_istringstream is not a template

    typedef basic_istringstream<char>     istringstream;


my compiler version is 11.1

Thks for any suggestions.

0 Kudos
1 Reply
Black Belt

The old icpc isn't compatible with the major changes made in g++ 5.2 to support -std=c++14.  Past icpc did sometimes require explicit setting of -std=c++0x where g++ did not.  However, you may need to install a version of g++ as implied by the prerequisites mentioned in the release notes of your icpc if you wish to continue using the no longer supported version.  For a reasonable degree of compatibility with g++ 5.2 you will need the icpc 16.x releases.

0 Kudos