- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am unable to compile the following c++ code.
#include <iostream> int main () { std::cout<<"Hello world !" <<std::endl ; return 0 ; }
gcc version 8.0.1 20180131
icpc version 18.0.1
Compilation Error :
icpc hello.cpp
In file included from /usr/include/c++/8/bits/move.h(55),
from /usr/include/c++/8/bits/nested_exception.h(40),
from /usr/include/c++/8/exception(144),
from /usr/include/c++/8/ios(39),
from /usr/include/c++/8/ostream(38),
from /usr/include/c++/8/iostream(39),
from hello.cpp(1):
/usr/include/c++/8/type_traits(1061): error: type name is not allowed
: public __bool_constant<__is_assignable(_Tp, _Up)>
^
In file included from /usr/include/c++/8/bits/move.h(55),
from /usr/include/c++/8/bits/nested_exception.h(40),
from /usr/include/c++/8/exception(144),
from /usr/include/c++/8/ios(39),
from /usr/include/c++/8/ostream(38),
from /usr/include/c++/8/iostream(39),
from hello.cpp(1):
/usr/include/c++/8/type_traits(1061): error: type name is not allowed
: public __bool_constant<__is_assignable(_Tp, _Up)>
^
In file included from /usr/include/c++/8/bits/move.h(55),
from /usr/include/c++/8/bits/nested_exception.h(40),
from /usr/include/c++/8/exception(144),
from /usr/include/c++/8/ios(39),
from /usr/include/c++/8/ostream(38),
from /usr/include/c++/8/iostream(39),
from hello.cpp(1):
/usr/include/c++/8/type_traits(1061): error: identifier "__is_assignable" is undefined
: public __bool_constant<__is_assignable(_Tp, _Up)>
^
compilation aborted for hello.cpp (code 2)
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Seems like GCC version you have installed isn't supported by ICC 18.0.
Regards,
Viet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
if you add the "-ansi" option, it will compile.
Regards
Jean-Charles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. That actually worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to install the GCC version is not supported by ICC 18.0. You can download the supported GCC version from rocketmail tech support. Then, you can run any C++ code to that supported GCC without compilation error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include <iostream> int main () { std::cout<<"Hello world !" <<std::endl ; return 0 ; }
add the "-ansi" option
full codes

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page