Hello all,
I am trying to install OpenCV 3.00 on my OS X. After running CMAKE, I went into my build directory and did 'make all'. I ran across the following error.
======================================================================================================
Brians-MacBook-Pro:build briansia1$ make all
[ 2%] Built target zlib
[ 8%] Built target libtiff
[ 13%] Built target libjpeg
[ 18%] Built target libjasper
[ 20%] Built target libpng
[ 28%] Built target IlmImf
[ 29%] Built target opencv_hal
[ 34%] Built target opencv_core
[ 40%] Built target opencv_imgproc
[ 41%] Built target opencv_imgcodecs
[ 41%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o
In file included from /Users/briansia1/Desktop/opencv-3.0.0/modules/videoio/src/cap_qtkit.mm:46:
In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:20:
In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:17:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:21: error: expected a type
- (id)copyWithZone:(nullable NSZone *)zone;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:25:28: error: expected a type
- (id)mutableCopyWithZone:(nullable NSZone *)zone;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:32:4: error: expected a type
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder; // NS_DESIGNATED_INITIALIZER
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:53:4: error: expected a type
- (nullable id)replacementObjectForCoder:(NSCoder *)aCoder;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:54:4: error: expected a type
- (nullable id)awakeAfterUsingCoder:(NSCoder *)aDecoder NS_REPLACES_RECEIVER;
^
In file included from /Users/briansia1/Desktop/opencv-3.0.0/modules/videoio/src/cap_qtkit.mm:46:
In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:20:
In file included from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:17:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6:
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error: expected ';' after @class
@class NSArray;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot find protocol declaration for 'ObjectType'
@class NSArray;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot find protocol declaration for 'ObjectType'
@interface NSEnumerator : NSObject
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error: expected unqualified-id
@interface NSEnumerator : NSObject
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:4: error: expected a type
- (nullable ObjectType)nextObject;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error: cannot find protocol declaration for 'ObjectType'
@interface NSEnumerator (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error: duplicate interface definition for class 'NSEnumerator'
@interface NSEnumerator (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note: previous definition is here
@interface NSEnumerator : NSObject
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error: method type specifier must start with '-' or '+'
@interface NSEnumerator (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error: expected a type
@interface NSEnumerator (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected selector for Objective-C method
@property (readonly, copy) NSArray *allObjects;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:28: error: unknown type name 'NSArray'
@property (readonly, copy) NSArray *allObjects;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:35: error: expected member name or ';' after declaration specifiers
@property (readonly, copy) NSArray *allObjects;
~~~~~~~^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: property requires fields to be named
@property (readonly, copy) NSArray *allObjects;
^ ~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:35: error: expected ';' at end of declaration list
@property (readonly, copy) NSArray *allObjects;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors 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
make: *** [all] Error 2
Brians-MacBook-Pro:build briansia1$
===================================================================================================
I am an OpenCV newbie, and hence do not have much experience with any of this. Any help will be appreciated. Thank you.
↧