Ask Your Question

Revision history [back]

I can't get latest OpenCV to link with latest Xcode

Try as I might I cannot get the latest OpenCV for iOS to link. All the errors are symbols linked from cap_ios_video_camera.o

Undefined symbols for architecture armv7: "_kCVPixelBufferPixelFormatTypeKey", referenced from: -[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGImageCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGBitmapContextCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetPixelFormatType", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBaseAddress", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBytesPerRow", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)

I've downloaded the framework three times, searched through this forum, stack overflow, /r/opencv on reddit and question on the apple website. So far nothing has affected these errors. My project is set to link with libc++ which is included in the link binaries as a dylib. All C++ dialects are set to C++11, I have opencv2.hpp include in the prefix header, I'm using namespace cv and all the source files have an mm extension. This is the LD command line -

Ld Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle normal armv7 cd /Source/Spectacle export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle -filelist /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle.LinkFileList -dead_strip -stdlib=libc++ -fobjc-link-runtime -miphoneos-version-min=7.0 -lc++ -framework opencv2 -framework OpenGLES -framework CoreGraphics -framework CoreImage -framework CoreMedia -framework CoreLocation -framework AssetsLibrary -framework QuartzCore -framework UIKit -framework AVFoundation -framework Foundation -Xlinker -dependency_info -Xlinker /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle_dependency_info.dat -o /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle

I can't get latest OpenCV to link with latest Xcode

Try as I might I cannot get the latest OpenCV for iOS to link. All the errors are symbols linked from cap_ios_video_camera.o

Undefined symbols for architecture armv7: "_kCVPixelBufferPixelFormatTypeKey", referenced from: -[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGImageCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGBitmapContextCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetPixelFormatType", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBaseAddress", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBytesPerRow", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)

I've downloaded the framework three times, searched through this forum, stack overflow, /r/opencv on reddit and question on the apple website. So far nothing has affected these errors. My project is set to link with libc++ which is included in the link binaries as a dylib. All C++ dialects are set to C++11, I have opencv2.hpp include in the prefix header, I'm using namespace cv and all the source files have an mm extension. This is the LD command line -

Ld Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle normal armv7 cd /Source/Spectacle export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle -filelist /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle.LinkFileList -dead_strip -stdlib=libc++ -fobjc-link-runtime -miphoneos-version-min=7.0 -lc++ -framework opencv2 -framework OpenGLES -framework CoreGraphics -framework CoreImage -framework CoreMedia -framework CoreLocation -framework AssetsLibrary -framework QuartzCore -framework UIKit -framework AVFoundation -framework Foundation -Xlinker -dependency_info -Xlinker /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle_dependency_info.dat -o /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle

I've download the source and tried to build it with the automatic process. That failed, perhaps because of something to do with cmake. After a few days you don't care why things that are supposed to work don't work. So now I'm trying to build it with Xcode non-automatically because at least I know that Xcode works.

I can't get latest OpenCV to link with latest Xcode

Try as I might I cannot get the latest OpenCV for iOS to link. All the errors are symbols linked from cap_ios_video_camera.o

Undefined symbols for architecture armv7: "_kCVPixelBufferPixelFormatTypeKey", referenced from: -[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGImageCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGBitmapContextCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetPixelFormatType", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBaseAddress", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBytesPerRow", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)

I've downloaded the framework three times, searched through this forum, stack overflow, /r/opencv on reddit and question on the apple website. So far nothing has affected these errors. My project is set to link with libc++ which is included in the link binaries as a dylib. All C++ dialects are set to C++11, I have opencv2.hpp include in the prefix header, I'm using namespace cv and all the source files have an mm extension. This is the LD command line -

Ld Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle normal armv7 cd /Source/Spectacle export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle -filelist /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle.LinkFileList -dead_strip -stdlib=libc++ -fobjc-link-runtime -miphoneos-version-min=7.0 -lc++ -framework opencv2 -framework OpenGLES -framework CoreGraphics -framework CoreImage -framework CoreMedia -framework CoreLocation -framework AssetsLibrary -framework QuartzCore -framework UIKit -framework AVFoundation -framework Foundation -Xlinker -dependency_info -Xlinker /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle_dependency_info.dat -o /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle

I've download the source and tried to build it with the automatic process. That failed, perhaps because of something to do with cmake. After a few days you don't care why things that are supposed to work don't work. So now I'm trying to build it with Xcode non-automatically because at least I know that Xcode works.works. I just tried greping the source for those missing symbols but it doesn't find them.

I can't get latest OpenCV to link with latest Xcode

Try as I might I cannot get the latest OpenCV for iOS to link. All the errors are symbols linked from cap_ios_video_camera.o

Undefined symbols for architecture armv7: "_kCVPixelBufferPixelFormatTypeKey", referenced from: -[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGImageCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGBitmapContextCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetPixelFormatType", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBaseAddress", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBytesPerRow", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)

I've downloaded the framework three times, searched through this forum, stack overflow, /r/opencv on reddit and question on the apple website. So far nothing has affected these errors. My project is set to link with libc++ which is included in the link binaries as a dylib. All C++ dialects are set to C++11, I have opencv2.hpp include in the prefix header, I'm using namespace cv and all the source files have an mm extension. This is the LD command line -

Ld Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle normal armv7 cd /Source/Spectacle export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle -filelist /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle.LinkFileList -dead_strip -stdlib=libc++ -fobjc-link-runtime -miphoneos-version-min=7.0 -lc++ -framework opencv2 -framework OpenGLES -framework CoreGraphics -framework CoreImage -framework CoreMedia -framework CoreLocation -framework AssetsLibrary -framework QuartzCore -framework UIKit -framework AVFoundation -framework Foundation -Xlinker -dependency_info -Xlinker /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle_dependency_info.dat -o /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle

I've download the source and tried to build it with the automatic process. That failed, perhaps because of something to do with cmake. but I didn't realise that cmake was a third party program that I had to download. So now I'm trying to build it with Xcode non-automatically because at least I know that Xcode works. I just tried greping the source for those missing symbols but it doesn't find them.

I can't get latest OpenCV to link with latest Xcode

Try as I might I cannot get the latest OpenCV for iOS to link. All the errors are symbols linked from cap_ios_video_camera.o

Undefined symbols for architecture armv7: "_kCVPixelBufferPixelFormatTypeKey", referenced from: -[CvVideoCamera createVideoDataOutput] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera createVideoFileOutput] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGImageCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_kCVPixelBufferCGBitmapContextCompatibilityKey", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetPixelFormatType", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBaseAddress", referenced from: -[CvVideoCamera pixelBufferFromCGImage:] in opencv2(cap_ios_video_camera.o) -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o) "_CVPixelBufferGetBytesPerRow", referenced from: -[CvVideoCamera captureOutput:didOutputSampleBuffer:fromConnection:] in opencv2(cap_ios_video_camera.o)

I've downloaded the framework three times, searched through this forum, stack overflow, /r/opencv on reddit and question on the apple website. So far nothing has affected these errors. My project is set to link with libc++ which is included in the link binaries as a dylib. All C++ dialects are set to C++11, I have opencv2.hpp include in the prefix header, I'm using namespace cv and all the source files have an mm extension. This is the LD command line -

Ld Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle normal armv7 cd /Source/Spectacle export IPHONEOS_DEPLOYMENT_TARGET=7.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -L/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle/Build/Products/Debug-iphoneos -F/Source/Spectacle -filelist /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle.LinkFileList -dead_strip -stdlib=libc++ -fobjc-link-runtime -miphoneos-version-min=7.0 -lc++ -framework opencv2 -framework OpenGLES -framework CoreGraphics -framework CoreImage -framework CoreMedia -framework CoreLocation -framework AssetsLibrary -framework QuartzCore -framework UIKit -framework AVFoundation -framework Foundation -Xlinker -dependency_info -Xlinker /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle_dependency_info.dat -o /Source/Spectacle/Build/Intermediates/Spectacle.build/Debug-iphoneos/Spectacle.build/Objects-normal/armv7/Spectacle

I've download the source but I didn't realise that cmake was a third party program that I had to download. I tried greping the source and found those missing symbols so I ran the automated build but it fails with errors. So now I'm trying to build it with Xcode non-automatically because at least I know that Xcode works. I just tried greping the source for those missing symbols but it doesn't find them.works.

Any suggestions at all? Does anybody have OpenCV running on iOS? Which version?