Help w/ Color Tracking Wiki Tutorial? Undefined reference...

Hi!

Extremely happy to have discovered oF and this community. I’m a fairly novice C++ programmer but a quick learner! Any help will be greatly appreciated. I have some great ideas but I’ve been banging my head against the wall for the last 3 hours.

I’m been attempting to learn oF via the color tracking wiki tutorial and it hasn’t been going so well: http://wiki.openframeworks.cc/index.php?title=Color-Tracking

I’ve got C::B and I feel as though I’ve added every path to the Build Options but it’s to no avail. I assume its a library path error but I’ve added them all.

Any help is greatly appreciated!

My testApp.h

  
#ifndef _TEST_APP  
#define _TEST_APP  
  
#define OF_ADDON_USING_OFXVECTORGRAPHICS  
#define OF_ADDON_USING_OFXOPENCV  
  
#include "ofMain.h"  
#include "ofAddons.h"  
  
#include "ofxVectorMath.h"  
#include "ofxOpenCv.h"  
  
class color  
{  
    public:  
  
        float hue, sat;  
  
        ofxVec2f pos;  
};  
  
class testApp : public ofBaseApp{  
  
	public:  
		void setup();  
		void update();  
		void draw();  
  
//		void keyPressed  (int key);  
//		void keyReleased(int key);  
//		void mouseMoved(int x, int y );  
//		void mouseDragged(int x, int y, int button);  
		void mousePressed(int x, int y, int button);  
//		void mouseReleased(int x, int y, int button);  
//		void windowResized(int w, int h);  
  
    ofVideoGrabber 		    vidGrabber;         //our video grabber  
    int 			        camWidth;           //cam width  
    int 			        camHeight;          //cam height (duh)  
  
    ofxCvColorImage		    colorImg;       //Main color image which is gonna get wrapped  
    ofxCvColorImage		    colorImgHSV;    //the image doing the wrapping  
  
    ofxCvGrayscaleImage		hueImg;     //Hue map  
    ofxCvGrayscaleImage		satImg;     //Saturation map  
    ofxCvGrayscaleImage     briImg;     //Brightness map  
  
    ofxCvGrayscaleImage     reds;               //Grayscale image we are gonna run the contour finder over to find our color  
  
    color                   one;                //color that we're gonna track  
  
    unsigned char *         colorTrackedPixelsRed;      //just some raw images which we are gonna put pixels into  
    ofTexture               trackedTextureRed;          //color texture that we are gonna draw to  
  
    ofxCvContourFinder      finderRed;                  //contour finder, very handys  
  
};  
  
#endif  

  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|  
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `/DEFAULTLIB:"LIBC" /DEFAULTLIB:"OLDNAMES" ' unrecognized|  
[color=#BF0000]obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvGrayscaleImage::getPixels()'|[/color]  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvGrayscaleImage::getPixels()'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvColorImage::setFromPixels(unsigned char*, int, int)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `vtable for ofxCvColorImage'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvColorImage::convertRgbToHsv()'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvColorImage::convertToGrayscalePlanarImages(ofxCvGrayscaleImage&, ofxCvGrayscaleImage&, ofxCvGrayscaleImage&)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::flagImageChanged()'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::flagImageChanged()'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::flagImageChanged()'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvGrayscaleImage::getPixels()'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvGrayscaleImage::getPixels()'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvGrayscaleImage::setFromPixels(unsigned char*, int, int)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvContourFinder::findContours(ofxCvGrayscaleImage&, int, int, int, bool, bool)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::allocate(int, int)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::allocate(int, int)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::allocate(int, int)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::allocate(int, int)'|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::allocate(int, int)'|  
obj\release\src\testApp.o:testApp.cpp|| more undefined references to `ofxCvImage::allocate(int, int)' follow|  
obj\release\src\testApp.o:testApp.cpp|| undefined reference to `ofxCvImage::draw(float, float)'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN19ofxCvGrayscaleImageD1Ev[ofxCvGrayscaleImage::~ofxCvGrayscaleImage()]+0xb)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN19ofxCvGrayscaleImageD1Ev[ofxCvGrayscaleImage::~ofxCvGrayscaleImage()]+0x12)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN19ofxCvGrayscaleImageD1Ev[ofxCvGrayscaleImage::~ofxCvGrayscaleImage()]+0x19)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN19ofxCvGrayscaleImageD1Ev[ofxCvGrayscaleImage::~ofxCvGrayscaleImage()]+0x1f)||undefined reference to `ofxCvImage::~ofxCvImage()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x4a)||undefined reference to `ofxCvContourFinder::~ofxCvContourFinder()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x78)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x82)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x8c)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xa2)||undefined reference to `ofxCvImage::~ofxCvImage()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xaf)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xb9)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xc3)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xd7)||undefined reference to `ofxCvImage::~ofxCvImage()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xe4)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xee)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0xf8)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x10e)||undefined reference to `ofxCvImage::~ofxCvImage()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x11b)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x125)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x12f)||undefined reference to `vtable for ofxCvGrayscaleImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x143)||undefined reference to `ofxCvImage::~ofxCvImage()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x150)||undefined reference to `vtable for ofxCvColorImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x15a)||undefined reference to `vtable for ofxCvColorImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x164)||undefined reference to `vtable for ofxCvColorImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x178)||undefined reference to `ofxCvImage::~ofxCvImage()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x185)||undefined reference to `vtable for ofxCvColorImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x18f)||undefined reference to `vtable for ofxCvColorImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x199)||undefined reference to `vtable for ofxCvColorImage'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x1ad)||undefined reference to `ofxCvImage::~ofxCvImage()'|  
obj\release\src\testApp.o:testApp.cpp:(.text$_ZN7testAppD0Ev[testApp::~testApp()]+0x2b2)||undefined reference to `vtable for ofxCvColorImage'|  
||More errors follow but not being shown.|  
||Edit the max errors limit in compiler options...|  
||=== Build finished: 50 errors, 17 warnings ===|  
  

Just found this: http://forum.openframeworks.cc/t/adding-code,-include-paths–addons-in-cb/3090/0

Followed the guide and it worked. Code::Blocks is nice for compiling but takes a little getting used to.

Thanks anyways! :wink: