Failure when using ofVideoGrabber

Hi guys,

I’m really new to Openframeworks so this must be something very stupid.

However, I’m having a build failure as soon as I declare a videograbber object as:

ofVideoGrabber cam;

in the testApp.h file. The error is a weird one, it’s actually over 100 compilation errors that go as:

  
Undefined symbols for architecture x86_64:  
  "ofAppGlutWindow::ofAppGlutWindow()", referenced from:  
      _main in main.o  
  "ofSetupOpenGL(ofAppBaseWindow*, int, int, int)", referenced from:  
      _main in main.o  
  "ofVideoGrabber::ofVideoGrabber()", referenced from:  
      _main in main.o  
  "ofRunApp(ofBaseApp*)", referenced from:  
      _main in main.o  
  "vtable for ofAppGlutWindow", referenced from:  
      _main in main.o  
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.  
  "ofVideoGrabber::~ofVideoGrabber()", referenced from:  
      testApp::~testApp() in testApp.o  
      testApp::~testApp() in testApp.o  
      non-virtual thunk to testApp::~testApp() in testApp.o  
      non-virtual thunk to testApp::~testApp() in testApp.o  
  "ofPixels_<unsigned char>::getPixelIndex(int, int) const", referenced from:  
      testApp::draw() in testApp.o  
  "ofFill()", referenced from:  
      testApp::draw() in testApp.o  
  "ofEllipse(float, float, float, float)", referenced from:  
      testApp::draw() in testApp.o  
  

I tried compiling both as 32 and 64 bits, to no avail. Does anyone know what causes this?

Thanks in advance!

Ok, one more detail: due to some other imports, I have to compile in 32 bits, so the errors are actually:

  
Undefined symbols for architecture i386:  
  "_kCVPixelBufferWidthKey", referenced from:  
      -[QTKitVideoGrabber initWithWidth:height:videodevice:audiodevice:usingAudio:capturePixels:pixelsRef:] in openFrameworksDebug.a(ofQTKitGrabber.o)  
  "_QTMediaTypeMuxed", referenced from:  
      +[QTKitVideoGrabber listVideoDevices] in openFrameworksDebug.a(ofQTKitGrabber.o)  
      -[QTKitVideoGrabber setVideoDeviceID:] in openFrameworksDebug.a(ofQTKitGrabber.o)  
  "_kCVPixelBufferOpenGLCompatibilityKey", referenced from:  
      -[QTKitVideoGrabber initWithWidth:height:videodevice:audiodevice:usingAudio:capturePixels:pixelsRef:] in openFrameworksDebug.a(ofQTKitGrabber.o)  
  ".objc_class_name_QTCompressionOptions", referenced from:  
      pointer-to-literal-objc-class-name in openFrameworksDebug.a(ofQTKitGrabber.o)  
  ".objc_class_name_QTCaptureMovieFileOutput", referenced from:  
      pointer-to-literal-objc-class-name in openFrameworksDebug.a(ofQTKitGrabber.o)  
  ".objc_class_name_QTCaptureVideoPreviewOutput", referenced from:  
  

and some more…

What OS and architecture are you using? which version of OF? Which IDE and compiler?
From the fact you also build in x86_64, I presume 64 bits? I think under Linux it is pretty complicated to build 32bits apps from within a 64bits system. Under Windows that should be more easy.

Anyhow, getting that amount of errors usually means something is wrong with dependencies and/or paths. Did you follow the guide as is provided at the download page of OF?
You get a lot of undefined symbols, so apparently your compiler or linker cannot find what it needs in order to compile your app. Make sure all include paths are set up as is described in the installation guides.