在Eclipse中尝试执行任何openCv程序时,会向我显示以下错误 .

12:40:14 ****增量构建配置发布项目SampleImage *使所有构建文件:../ Main.cpp调用:GCC C编译器g -I / usr / local / Cellar / opencv / 3.4.1_2 / include -I / Library / Developer / CommandLineTools / usr / include -I / Library / Developer / CommandLineTools / usr / include / c / v1 -O3 -Wall -c -fmessage-length = 0 -std = c 11 -MMD -MP -MF“Main.d”-MT“Main.o”-o“Main.o”“../ Main.cpp”包含在../Main.cpp:1:/ Library / Developer中的文件中/ CommandLineTools / usr / include / c /v1/stdlib.h:111:82:错误:使用未声明的标识符'labs';你的意思是'abs'吗? inline _LIBCPP_INLINE_VISIBILITY long abs(long _x)NOEXCEPT {return labs( x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h:111:44:注意:'abs'在此处声明内联_LIBCPP_INLINE_VISIBILITY long abs(long _x)NOEXCEPT {return labs( x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h:113:81:错误:使用未声明的标识符'llabs'内联_LIBCPP_INLINE_VISIBILITY long long abs(long long _x)NOEXCEPT {return llabs( x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h:116:35:错误:未知类型名称'ldiv_t'内联_LIBCPP_INLINE_VISIBILITY ldiv_t div(long _x,long y)NOEXCEPT {return ldiv( x, y);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h:116:95:错误:使用未声明的标识符'ldiv';你是说'div'吗? inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long _x,long y)NOEXCEPT {return ldiv( x, y);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h:116:42:note:'div '在这里声明内联_LIBCPP_INLINE_VISIBILITY ldiv_t div(long _x,long y)NOEXCEPT {return ldiv( x, y);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h:118:34:error :未知类型名称'lldiv_t'内联_LIBCPP_INLINE_VISIBILITY lldiv_t div(long long _x,long long y)NOEXCEPT {return lldiv( x, y);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h :118:94:错误:使用未声明的标识符'lldiv'内联_LIBCPP_INLINE_VISIBILITY lldiv_t div(long long _x,long long y)NOEXCEPT {return lldiv( x, y);} ^包含在../Main.cpp中的文件中: 3:/ Library / Developer / CommandLineTools / usr / include / c /v1/math.h:733:41:错误:全局命名空间中没有名为'fabsf'的成员abs(float _lcpp_x)NOEXCEPT {return :: fabsf( lcpp_x );} ~~ ^ / Library / Developer / Comman dLineTools / usr / include / c /v1/math.h:737:42:错误:全局命名空间中没有名为'fabs'的成员;你的意思是'abs'吗? abs(double _lcpp_x)NOEXCEPT {return :: fabs( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/stdlib.h:111:44:注意:'abs'在这里声明为内联_LIBCPP_INLINE_VISIBILITY long abs(long _x)NOEXCEPT {return labs( x);} ^包含在../Main.cpp:3的文件中:/ Library / Developer / CommandLineTools / usr / include / c /v1/math.h:741 :47:错误:全局命名空间中没有名为'fabsl'的成员abs(long double _lcpp_x)NOEXCEPT {return :: fabsl( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c / v1 / math.h:747:93:错误:全局命名空间中没有名为'acosf'的成员;你是说'acos'吗? inline _LIBCPP_INLINE_VISIBILITY float acos(float _lcpp_x)NOEXCEPT {return :: acosf( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:747:46:note:'acos'这里声明内联_LIBCPP_INLINE_VISIBILITY float acos(float _lcpp_x)NOEXCEPT {return :: acosf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:748:93:错误:没有成员命名全局命名空间中的'acosl';你是说'acos'吗? inline _LIBCPP_INLINE_VISIBILITY long double acos(long double _lcpp_x)NOEXCEPT {return :: acosl( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:747:46:note:' acos'在这里声明内联_LIBCPP_INLINE_VISIBILITY float acos(float _lcpp_x)NOEXCEPT {return :: acosf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:754:38:error:call 'acos'是模糊的acos(_A1 _lcpp_x)NOEXCEPT {return :: acos((double) lcpp_x);} ^ ~~~~~ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h: 747:46:注意:候选函数内联_LIBCPP_INLINE_VISIBILITY float acos(float _lcpp_x)NOEXCEPT {return :: acosf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:748:46 :注意:候选函数内联_LIBCPP_INLINE_VISIBILITY long double acos(long double _lcpp_x)NOEXCEPT {return :: acosl( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:759:93:错误:在glo中没有名为'asinf'的成员bal命名空间;你是说'asin'吗? inline _LIBCPP_INLINE_VISIBILITY float asin(float _lcpp_x)NOEXCEPT {return :: asinf( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:759:46:注意:'asin'在这里声明内联_LIBCPP_INLINE_VISIBILITY float asin(float _lcpp_x)NOEXCEPT {return :: asinf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:760:93:错误:没有名为'asinl'的成员在全局命名空间中;你是说'asin'吗? inline _LIBCPP_INLINE_VISIBILITY long double asin(long double _lcpp_x)NOEXCEPT {return :: asinl( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:759:46:note:' asin'在这里声明内联_LIBCPP_INLINE_VISIBILITY float asin(float _lcpp_x)NOEXCEPT {return :: asinf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:766:38:error:call 'asin'是不明确的asin(_A1 _lcpp_x)NOEXCEPT {return :: asin((double) lcpp_x);} ^ ~~~~~ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h: 759:46:注意:候选函数内联_LIBCPP_INLINE_VISIBILITY浮动asin(float _lcpp_x)NOEXCEPT {return :: asinf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:760:46 :注意:候选函数内联_LIBCPP_INLINE_VISIBILITY long double asin(long double _lcpp_x)NOEXCEPT {return :: asinl( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:771:93:错误:在glo中没有名为'atanf'的成员bal命名空间;你是说'atan'吗? inline _LIBCPP_INLINE_VISIBILITY float atan(float _lcpp_x)NOEXCEPT {return :: atanf( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:771:46:注意:'atan'这里声明内联_LIBCPP_INLINE_VISIBILITY float atan(float _lcpp_x)NOEXCEPT {return :: atanf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:772:93:错误:没有成员命名全局命名空间中的'atanl';你是说'atan'吗?内联_LIBCPP_INLINE_VISIBILITY long double atan(long double _lcpp_x)NOEXCEPT {return :: atanl( lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:771:46:note:' atan'在这里声明内联_LIBCPP_INLINE_VISIBILITY float atan(float _lcpp_x)NOEXCEPT {return :: atanf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:778:38:错误:调用到'atan'是不明确的atan(_A1 _lcpp_x)NOEXCEPT {return :: atan((double) lcpp_x);} ^ ~~~~~ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h: 771:46:注意:候选函数内联_LIBCPP_INLINE_VISIBILITY float atan(float _lcpp_x)NOEXCEPT {return :: atanf( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:772:46 :注意:候选函数内联_LIBCPP_INLINE_VISIBILITY long double atan(long double _lcpp_x)NOEXCEPT {return :: atanl( lcpp_x);} ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:783:116:错误:g中没有名为'atan2f'的成员全名命名空间;你是说'atan2'吗? inline _LIBCPP_INLINE_VISIBILITY float atan2(float _lcpp_y,float lcpp_x)NOEXCEPT {return :: atan2f( lcpp_y, lcpp_x);} ~~ ^ / Library / Developer / CommandLineTools / usr / include / c /v1/math.h:783:46:注意:'atan2'在这里声明为内联_LIBCPP_INLINE_VISIBILITY float atan2(float _lcpp_y,float lcpp_x)NOEXCEPT {return :: atan2f( lcpp_y, lcpp_x);} ^致命错误:发出的错误太多,现在停止[-ferror-limit =] 20错误产生 . make: [Main.o]错误1

12:40:15 Build Finished (took 974ms)

我在终端中运行了以下命令:

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

$ gcc
clang: error: no input files

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

我有Xcode版本9.3(9E145)