Building OpenCV in Mac Os X (10.9.1) - video library error
Dear all,
I recently upgraded my gcc compiler to version (4.8.2). After trying to install OpenCV (2.4.8), I get some compiler errors when building the opencv_video library. The way I'm building the OpenCV library is as follows:
cd opencv-2.4.8
mkdir release
cd release/
cmake -D CMAKE_CXX_FLAGS="-I/opt/local/includes -L/opt/local/lib" -D CMAKE_INSTALL_PREFIX="/opt/local" -D CMAKE_BUILD_TYPE=Release -D CMAKE_VERBOSE_MAKEFILE=ON ..
make -j 4
The error message is given below and any feedback/suggestions are really welcomed :-) When following the same steps mentioned above for building the OpenCV library, but with using gcc 4.2.1, I didn't get any compilation problems and the library could be successfully installed.
"/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_progress_report /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/CMakeFiles
[ 42%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/video_init.cpp.o
cd /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/modules/video && /opt/local/bin/c++ -DCVAPI_EXPORTS -I/opt/local/includes -L/opt/local/lib -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -pthread -fomit-frame-pointer -msse -msse2 -msse3 -O3 -DNDEBUG -DNDEBUG -fPIC -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/perf -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/features2d/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/highgui/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/imgproc/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/flann/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/core/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/ts/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/include -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/modules/video -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/src -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/test -I/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release -I/opt/local/include -include "/Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/release/modules/video/precomp.hpp" -Winvalid-pch -o CMakeFiles/opencv_video.dir/src/video_init.cpp.o -c /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/video/src/video_init.cpp
In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:51:0,
from /Users/r2d2/Downloads/sw/opencv/opencv-2.4.8/modules/highgui/src/cap_qtkit.mm:46:
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected ')' before '(' token
- (void)modernizeWithCompletionHandler:(void (^)(void))handler AVAILABLE_QTKIT_VERSION_7_7_3_AND_LATER;
^
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected identifier before '(' token
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected ';' before '(' token
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:156:18: error: unknown property attribute before ',' token
@property (atomic, readonly) NSError * error AVAILABLE_QTKIT_VERSION_7_7_3_AND_LATER;
^
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:156 ...