专家
我正在尝试在this官方安装指南下的OS X 10.8.3上构建OpenCV2。
配置步骤正常:
cmake -D:CMAKE_BUILD_TYPE=RELEASE ..
但是当我使用make构建它时:
make -j 8
有很多像这样的Object-C错误:
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:260: error: expected ';' before '__attribute__'
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected ':' before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected type-specifier before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected ')' before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected identifier before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:261: error: expected ';' before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:262: error: expected ';' before '__attribute__'
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:52,
from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:8,
from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:11,
from /Users/kuankuan/Desktop/RoysData/Workspace/opencv/opencv-2.4.5/modules/highgui/src/cap_qtkit.mm:34:
/System/Library/Frameworks/Foundation.framework/Headers/NSPointerArray.h:57: error: expected ';' before '__attribute__'
/System/Library/Frameworks/Foundation.framework/Headers/NSPointerArray.h:58: error: expected ';' before '__attribute__'
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:54,
from /System/Library/Frameworks/QTKit.framework/Headers/QTError.h:8,
from /System/Library/Frameworks/QTKit.framework/Headers/QTKit.h:11,
from /Users/kuankuan/Desktop/RoysData/Workspace/opencv/opencv-2.4.5/modules/highgui/src/cap_qtkit.mm:34:
/System/Library/Frameworks/Foundation.framework/Headers/NSPort.h:68: error: expected constructor, destructor, or type conversion before '-' token[ 42%]
/System/Library/Frameworks/Foundation.framework/Headers/NSPort.h:115: error: expected constructor, destructor, or type conversion before '-' token
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:57,
我已经安装了XCode和xcode命令行工具。我该如何处理这个问题?我将在c ++下使用opencv。
非常感谢!