1

彼ら

この公式インストールガイドの下で、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 を使用します。

どうもありがとう !

4

0 に答える 0