- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using eclipse v4.3.2 and the extension of Intel c++ compiler (v14, 64bit) in Fedora. I use -std=c++11 and __cplusplus=201103L in the project property. There is no error marked in my c++ source files. But when I "Build Project", I received more than 100 error messages similar to the following two:
In file included from /usr/include/c++/4.8.2/bits/move.h(57),
from /usr/include/c++/4.8.2/bits/stl_pair.h(59),
from /usr/include/c++/4.8.2/bits/stl_algobase.h(64),
from /usr/include/c++/4.8.2/bits/char_traits.h(39),
from /usr/include/c++/4.8.2/ios(40),
from /usr/include/c++/4.8.2/ostream(38),
from /usr/include/c++/4.8.2/iostream(39),
from ../Source/StringParsing.h(6),
from ../Source/StringParsing.cpp(1):
/usr/include/c++/4.8.2/type_traits(464): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
is_member_pointer<_Tp>, __is_nullptr_t<_Tp>>::type
^
In file included from /usr/include/c++/4.8.2/bits/move.h(57),
from /usr/include/c++/4.8.2/bits/stl_pair.h(59),
from /usr/include/c++/4.8.2/bits/stl_algobase.h(64),
from /usr/include/c++/4.8.2/bits/char_traits.h(39),
from /usr/include/c++/4.8.2/ios(40),
from /usr/include/c++/4.8.2/ostream(38),
from /usr/include/c++/4.8.2/iostream(39),
from ../Source/StringParsing.h(6),
from ../Source/StringParsing.cpp(1):
/usr/include/c++/4.8.2/type_traits(576): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
: public __and_<is_arithmetic<_Tp>, __not_<is_signed<_Tp>>>::type
^
What can I do to eliminate these errors? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maosi,
do you have the complete CDT build console error message? which should contains the actual command line options used? Something like below:
You may try the same command line on a terminal and see whether it can reproduce the issue with your StringParsing.cpp file. If yes, send me the command line. I am wondering whether the issue is related to the options of compiler.
Thanks,
Shenghong
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot reproduce the issue with various compiler versions from v13 to v15... could you please provide more details of your compiler version with "icc -V".
$ cat temp.c #include <iostream> #include <type_traits> struct A { int x; }; int main() { int A::* pt = &A::x; std::cout << std::boolalpha; std::cout << "is_member_pointer:" << std::endl; std::cout << "A*: " << std::is_member_pointer<A*>::value << std::endl; std::cout << "int A::*: " << std::is_member_pointer<int A::*>::value << std::endl; std::cout << "void(A::*)(): " << std::is_member_pointer<void(A::*)()>::value << std::endl; std::cout << "decltype(pt): " << std::is_member_pointer<decltype(pt)>::value << std::endl; return 0; } $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/gcc-4.8.2/libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ./configure --prefix=/opt/gcc-4.8.2/ Thread model: posix gcc version 4.8.2 (GCC) $ icpc temp.c -std=c++11 -D__cplusplus=201103L $ ./a.out is_member_pointer: A*: false int A::*: true void(A::*)(): true decltype(pt): true $
Thanks,
Shenghong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icc version 14.0.2 (gcc version 4.8.0 compatibility)
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry, icc -V gives the following:
Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.144 Build 20140120
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maosi,
could you please try the code I provided in my last reply and see whether it can reproduce your issue? It works on my platform, using gcc4.8.2.
$ icpc temp.c -std=c++11 -D__cplusplus=201103L $ icc -V Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.2.144 Build 20140120 Copyright (C) 1985-2014 Intel Corporation. All rights reserved. $
If you can reproduce with above code, could you please send me the pre-processed file? (icc -E temp.c > out.i)
Thanks,
Shenghong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shenghong, Thank you for your patient instruction.
There is no output for "icpc temp.c -std=c++11 -D__cplusplus=201103L
". Can I assume temp.c be compiled correctly? There is a a.out file generated.
But when I executed "icc -E temp.c > out.i", the following two messages showed:
temp.c(1): error #2379: cannot open source file "iostream"
#include <iostream>
^
temp.c(2): error #2379: cannot open source file "type_traits"
#include <type_traits>
^
It did generate a "out.i" file, which I attached here (inside out.zip).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maosi,
yes, if there are no output, it looks like it compiles with the above test case. This is strange (it should hit the same header as the error you reported). Is it possible that you send me your project to have a look and see whether I can reproduce here?
If it works for you, sending me the pre-processed file cannot help. :( You get the "iostream" cannot be found issue, because you are using ICC to build a CPP file with ".c" file extension. You can build with "icpc" or change 'temp.c' to "temp.cpp".
Thanks,
Shenghong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shenghong,
You are right. No error message for the command:
% icpc -E -std=c++11 temp.c > out.txt
I tried the similar command on two of my real source files (StringParsing.cpp and StringParsing.h), no error message either:
% icc -E -std=c++11 -D__cplusplus=201103L StringParsing.cpp > SP1.txt
But, I got the error message from eclipse:
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Maosi,
do you have the complete CDT build console error message? which should contains the actual command line options used? Something like below:
You may try the same command line on a terminal and see whether it can reproduce the issue with your StringParsing.cpp file. If yes, send me the command line. I am wondering whether the issue is related to the options of compiler.
Thanks,
Shenghong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Shenghong,
I discarded the old project and recreate the project. This time some errors about "memcpy", "_chdir", and "_mkdir" in my source codes were marked in the eclipse. Once I added the correct header files, errors went away and the "Build Project" was successful. Sorry for the troubles. Thanks again.
The console output for my last "Build Project".
10:14:50 **** Incremental Build of configuration Release for project DS_SS_TR_eclipse ****
Info: Configuration "Release" uses tool-chain "Intel Toolchain for Executable on Intel(R) 64" that is unsupported on this system, attempting to build anyway.
make -k all
Building file: ../Source/DC_ObjFunc.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/DC_ObjFunc.d" -MT"Source/DC_ObjFunc.d" -c -o "Source/DC_ObjFunc.o" "../Source/DC_ObjFunc.cpp"
Finished building: ../Source/DC_ObjFunc.cpp
Building file: ../Source/DC_SS_TR_main.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/DC_SS_TR_main.d" -MT"Source/DC_SS_TR_main.d" -c -o "Source/DC_SS_TR_main.o" "../Source/DC_SS_TR_main.cpp"
Finished building: ../Source/DC_SS_TR_main.cpp
Building file: ../Source/DC_TR_solver.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/DC_TR_solver.d" -MT"Source/DC_TR_solver.d" -c -o "Source/DC_TR_solver.o" "../Source/DC_TR_solver.cpp"
Finished building: ../Source/DC_TR_solver.cpp
Building file: ../Source/DC_common.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/DC_common.d" -MT"Source/DC_common.d" -c -o "Source/DC_common.o" "../Source/DC_common.cpp"
Finished building: ../Source/DC_common.cpp
Building file: ../Source/DC_scatter_search.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/DC_scatter_search.d" -MT"Source/DC_scatter_search.d" -c -o "Source/DC_scatter_search.o" "../Source/DC_scatter_search.cpp"
Finished building: ../Source/DC_scatter_search.cpp
Building file: ../Source/DC_thread_call.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/DC_thread_call.d" -MT"Source/DC_thread_call.d" -c -o "Source/DC_thread_call.o" "../Source/DC_thread_call.cpp"
Finished building: ../Source/DC_thread_call.cpp
Building file: ../Source/Global_Variables_DC_common.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/Global_Variables_DC_common.d" -MT"Source/Global_Variables_DC_common.d" -c -o "Source/Global_Variables_DC_common.o" "../Source/Global_Variables_DC_common.cpp"
Finished building: ../Source/Global_Variables_DC_common.cpp
Building file: ../Source/Global_Variables_mutex.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/Global_Variables_mutex.d" -MT"Source/Global_Variables_mutex.d" -c -o "Source/Global_Variables_mutex.o" "../Source/Global_Variables_mutex.cpp"
Finished building: ../Source/Global_Variables_mutex.cpp
Building file: ../Source/Global_Variables_optimization.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/Global_Variables_optimization.d" -MT"Source/Global_Variables_optimization.d" -c -o "Source/Global_Variables_optimization.o" "../Source/Global_Variables_optimization.cpp"
Finished building: ../Source/Global_Variables_optimization.cpp
Building file: ../Source/ReadInitialParameters.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/ReadInitialParameters.d" -MT"Source/ReadInitialParameters.d" -c -o "Source/ReadInitialParameters.o" "../Source/ReadInitialParameters.cpp"
Finished building: ../Source/ReadInitialParameters.cpp
Building file: ../Source/StringParsing.cpp
Invoking: Intel Intel(R) 64 C++ Compiler
icpc -std=c++11 -mkl=parallel -D__cplusplus=201103L -MMD -MP -MF"Source/StringParsing.d" -MT"Source/StringParsing.d" -c -o "Source/StringParsing.o" "../Source/StringParsing.cpp"
Finished building: ../Source/StringParsing.cpp
Building target: DS_SS_TR_eclipse
Invoking: Intel Intel(R) 64 C++ Linker
icpc -mkl=parallel -o "DS_SS_TR_eclipse" ./Source/DC_ObjFunc.o ./Source/DC_SS_TR_main.o ./Source/DC_TR_solver.o ./Source/DC_common.o ./Source/DC_scatter_search.o ./Source/DC_thread_call.o ./Source/Global_Variables_DC_common.o ./Source/Global_Variables_mutex.o ./Source/Global_Variables_optimization.o ./Source/ReadInitialParameters.o ./Source/StringParsing.o
Finished building target: DS_SS_TR_eclipse
10:15:05 Build Finished (took 14s.742ms)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page