0073 QTKitVideoGrabber error (Mach-o Linker)

i just upgraded to osx 10.7.5 (from snow leopards) and started using OF0073

I am not able to get the openCvExample to work when using live video.
Same problem with the videoGrabberExample.

It does not compile completely and gives me the error below.

error message:
Undefined symbols for architecture i386:
“_objc_setProperty_atomic”, referenced from:
-[QTKitVideoGrabber setSession:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_objc_setProperty_nonatomic”, referenced from:
-[QTKitVideoGrabber setVideoDeviceInput:] in openFrameworksDebug.a(ofQTKitGrabber.o)
-[QTKitVideoGrabber setAudioDeviceInput:] in openFrameworksDebug.a(ofQTKitGrabber.o)
-[QTKitVideoGrabber setCaptureMovieFileOutput:] in openFrameworksDebug.a(ofQTKitGrabber.o)
ld: symbol(s) not found for architecture i386

It also says something about Apple Mach-O Linker (Id) Error

seems i had to set the base sdk to 10.7 for both my project and openframworks

Thanks for taking the time to post the solution here - I had exactly the same problem.

For anyone else with the issue, what took me a while to figure out is that the base SDK setting for openFrameworks is set through an openFrameworksLib.xcodeproj project inside the openFrameworks group of the navigator.

Hi,

I’m new to OF and I 'm having a similar error–I wonder if they are related. I still get these Mach-o Linker errors, but I wonder if I just didn’t define something :slight_smile: Please help!

I’m running OF 0073 on mac with OSX 10.8.2, XCode 4.5.2 and I set the base SDK for my app and OF to 10.7.

Undefined symbols for architecture i386:
“.objc_class_name_QTCaptureDevice”, referenced from:
pointer-to-literal-objc-class-name in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVPixelBufferGetBytesPerRow”, referenced from:
-[QTKitVideoGrabber update] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVPixelBufferUnlockBaseAddress”, referenced from:
-[QTKitVideoGrabber update] in openFrameworksDebug.a(ofQTKitGrabber.o)
“.objc_class_name_QTCompressionOptions”, referenced from:
pointer-to-literal-objc-class-name in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVBufferRelease”, referenced from:
-[QTKitVideoGrabber outputVideoFrame:withSampleBuffer:fromConnection:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_QTMediaTypeVideo”, referenced from:
+[QTKitVideoGrabber listVideoDevices] in openFrameworksDebug.a(ofQTKitGrabber.o)
-[QTKitVideoGrabber setVideoDeviceID:] in openFrameworksDebug.a(ofQTKitGrabber.o)
+[QTKitVideoGrabber listVideoCodecs] in openFrameworksDebug.a(ofQTKitGrabber.o)
-[QTKitVideoGrabber setVideoCodec:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“.objc_class_name_QTCaptureVideoPreviewOutput”, referenced from:
.objc_class_name_QTKitVideoGrabber in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVPixelBufferGetHeight”, referenced from:
-[QTKitVideoGrabber update] in openFrameworksDebug.a(ofQTKitGrabber.o)
“.objc_class_name_QTCaptureSession”, referenced from:
pointer-to-literal-objc-class-name in openFrameworksDebug.a(ofQTKitGrabber.o)
“.objc_class_name_QTCaptureDeviceInput”, referenced from:
pointer-to-literal-objc-class-name in openFrameworksDebug.a(ofQTKitGrabber.o)
“_QTMediaTypeMuxed”, referenced from:
+[QTKitVideoGrabber listVideoDevices] in openFrameworksDebug.a(ofQTKitGrabber.o)
-[QTKitVideoGrabber setVideoDeviceID:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_kCVPixelBufferHeightKey”, referenced from:
-[QTKitVideoGrabber initWithWidth:height:videodevice:audiodevice:usingAudio:capturePixels:pixelsRef:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_kCVPixelBufferPixelFormatTypeKey”, referenced from:
-[QTKitVideoGrabber initWithWidth:height:videodevice:audiodevice:usingAudio:capturePixels:pixelsRef:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVPixelBufferRelease”, referenced from:
-[QTKitVideoGrabber dealloc] in openFrameworksDebug.a(ofQTKitGrabber.o)
“.objc_class_name_QTCaptureMovieFileOutput”, referenced from:
pointer-to-literal-objc-class-name in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVPixelBufferGetBaseAddress”, referenced from:
-[QTKitVideoGrabber update] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_kCVPixelBufferOpenGLCompatibilityKey”, referenced from:
-[QTKitVideoGrabber initWithWidth:height:videodevice:audiodevice:usingAudio:capturePixels:pixelsRef:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVBufferRetain”, referenced from:
-[QTKitVideoGrabber outputVideoFrame:withSampleBuffer:fromConnection:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_QTMediaTypeSound”, referenced from:
+[QTKitVideoGrabber listAudioDevices] in openFrameworksDebug.a(ofQTKitGrabber.o)
-[QTKitVideoGrabber setAudioDeviceID:] in openFrameworksDebug.a(ofQTKitGrabber.o)
+[QTKitVideoGrabber listAudioCodecs] in openFrameworksDebug.a(ofQTKitGrabber.o)
-[QTKitVideoGrabber setAudioCodec:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVPixelBufferLockBaseAddress”, referenced from:
-[QTKitVideoGrabber update] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_kCVPixelBufferWidthKey”, referenced from:
-[QTKitVideoGrabber initWithWidth:height:videodevice:audiodevice:usingAudio:capturePixels:pixelsRef:] in openFrameworksDebug.a(ofQTKitGrabber.o)
“_CVPixelBufferGetWidth”, referenced from:
-[QTKitVideoGrabber update] in openFrameworksDebug.a(ofQTKitGrabber.o)

You’re probably missing the QTKit framework. This can happen if you have a project built for an earlier version of OF. OF 0073 introduced the new videograbber using QTKit on OSX, so older projects will be missing this framework.

Add it by:

  • Click on the project in the browser pane to the left

  • Click on the target under Targets

  • Click on the Summary tab

  • Expand Linked Frameworks and Libraries if not expanded

  • Click on the + icon and type QTKit into the search box and add QTkit

I spoke too soon. You also need to add the CoreVideo framework.

I just tested with a project that had the same error and, after adding QTKit and CoreVideo it builds fine with either 10.7 or Current OS (10.8) as the Base SDK.

Hi, it happend to me in the new proj cameraLensOffsetExample in ofx074 as well. My system is 10.7.5, Xcode is 4.5.2. I check the lib attached, both QTKit and CoreVideo is there. so similar problem but seems the solution here didn’t works to me. Anyone has an idea about this?

Cheers,
Pengfei

Sorted, in a similar way. In ofx folder, find libs/openFrameworksCompiled/project/osx/, there is a xcodeproj, open that, set the base SDK as your current sdk (like 10.7), then close it, compile the project used has the smilar exception, then everything works fine.