Ask Your Question
1

Errors on compiling OpenCV on MacOS Sierra

asked 2016-10-12 14:00:22 -0600

LDG gravatar image

Good evening guys,

I am having an error when I execute the command

make -j4

on my terminal. The error is the following:

/Users/lucadigiammarino/opencv/modules/videoio/src/cap_qtkit.mm:46:9: fatal error: 'QTKit/QTKit.h' file not found
#import <QTKit/QTKit.h>
        ^
1 error generated.
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2

I have been following this tutorial http://www.pyimagesearch.com/2015/06/... in order to get OpenCV 3.1.0 with Python on my Mac.

This is what I execute in order to configure the build:

cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D PYTHON3_PACKAGES_PATH=~/.virtualenvs/cv3/lib/python3.4/site-packages \
    -D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib \
    -D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/include/python3.4m \
    -D INSTALL_C_EXAMPLES=OFF \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D BUILD_EXAMPLES=ON \
    -D BUILD_opencv_python3=ON \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules ..

Thank you for your help.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2016-10-12 14:10:40 -0600

x10s gravatar image

Clone the opencv repo to a new folder and don't do the checkout step i.e.

git checkout 3.0.0

The rest of the steps can be followed as mentioned in the link. This means you will be working with the dev branch instead of the release branch. The dev branch has the fix.

edit flag offensive delete link more

Comments

I missed this but I hope you skipped checking out the release branch for opencv_contrib as well. They need to be the same version.

x10s gravatar imagex10s ( 2016-10-12 15:06:35 -0600 )edit

Yes, thanks anyway for your quick reply!

LDG gravatar imageLDG ( 2016-10-12 15:19:00 -0600 )edit

YES, It works! thanks very much!

chowchung gravatar imagechowchung ( 2016-11-09 17:27:20 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-10-12 14:00:22 -0600

Seen: 1,748 times

Last updated: Oct 12 '16