在Mac 10.10.3上构建opencv 2.4.10失败 [英] Build opencv 2.4.10 on Mac 10.10.3 failed

查看:140
本文介绍了在Mac 10.10.3上构建opencv 2.4.10失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Mac 10.10.3上使用Xcode 6.3构建opencv 2.4.10.并且在构建过程中发生了以下错误.

I tried to build opencv 2.4.10 on Mac 10.10.3 with Xcode 6.3. And the following errors occurred by building.

/Users/Shirui/work/program/opencv-2.4.10/modules/legacy/src/calibfilter.cpp:98:9:错误:数组比较 "this-> latestPoints"不等于空指针始终为真[-Werror,-Wtautologic-pointer-compare] 如果(latestPoints!= NULL) ^ ~~~~~~~~~~~~~~~ /Users/Shirui/work/program/opencv-2.4.10/modules/legacy/src/calibfilter.cpp:526:9:错误:数组地址 'this-> latestCounts'将始终评估为'true'[-Werror,-Wpointer-bool-conversion] 如果(latestCounts) ~~ ^ ~~~~~~~~~~~ 产生2个错误.

/Users/Shirui/work/program/opencv-2.4.10/modules/legacy/src/calibfilter.cpp:98:9: error: comparison of array 'this->latestPoints' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] if (latestPoints != NULL) ^~~~~~~~~~~~ ~~~~ /Users/Shirui/work/program/opencv-2.4.10/modules/legacy/src/calibfilter.cpp:526:9: error: address of array 'this->latestCounts' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if( latestCounts ) ~~ ^~~~~~~~~~~~ 2 errors generated.

我使用的命令:

mkdir path-to-opencv-source/build
cd path-to-opencv-source/build
cmake -G "Unix Makefiles" ..
make -j8

非常感谢

推荐答案

这实际上是在使用 clang 构建OpencV时发生的问题.

That's actually a problem that happens when building OpencV with clang.

首先是在此处讨论,然后是您当然可以自行修复,也可以下载最新版本的OpenCV.

You can do the fix youself, of course, or just download a more recent version of OpenCV.

这篇关于在Mac 10.10.3上构建opencv 2.4.10失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆