The most recent project porting really hurts. For example, I add a C ++ standard header file in a. h file:
# Include <vector> # include <map>
The compilation result is that the header file cannot be found. When the path of the standard library is opened, the file is clearly there, so you can add the include path in the project settings, and the result is still useless.
Later I checked it for a long time to know that when the GCC compilation of the C and C ++ mixed projects of CDT, the default is to compile the C standard first, so I found that there was a problem with the compilation option settings, and finally added-X to the compilation options to solve the problem. At the same time, the compiler also solved the keyword class error:
However, it was later found that the-x parameter was faulty, which could lead to unrecognized parameters such as-MMD during compilation and failed compilation, in my Eclipse project settings, the standard C ++ and C header file include paths are not added, so there is no problem after adding them.