Error compiling ofxCV

Hi all,

I was running the faceTracker example with no problems last week, but not suddenly when I try to compile I get this error:

using namespace ofxCv; //‘ofxCv’ is not a name-space

I tried to re-download and import ofxCV, that did not work.

In my project config file I have included the headers like so:

HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) “…/…/…/addons/ofxOpenCv/libs/opencv/include/” “…/…/…/addons/ofxCv/libs/ofxCv/include/”

Any ideas for what the issue is here?


if you see “is not a namespace” that probably means the files aren’t being included correctly, so it doesn’t know anything about the namespace ofxCv. this probably has something to do with how you added the library to your project.

if the example projects themself aren’t building, you might have the code at the wrong level/in the wrong location.

if you can stop by my office hours tomorrow/today that would be best :slight_smile: then you can respond back to yourself with the solution after we figure it out together :wink:

Did you guys ever figure this out. I have the exact same problem…

we couldn’t figure it out, so we just rebuilt the project from scratch by starting with a working OF project, then adding the ofxCv libs, include, and the ofxOpenCv libs too.

hmm ok I’m starting with the working ofxOpenCv example and adding ofxCv to the project and I’m still getting the same errors. bummer.

if you do this:

  • download ofxCv, make sure it’s in of/addons/ofxCv/ and not of/addons/ofxCv-fd55447622/ or something (this is important for ofxFaceTracker too, if you’ve used the download .zip instead of git clone)
  • run any of the examples

then it should work. don’t do anything more or anything less. don’t move the examples around or rename things. these are things xcode sometimes gets confused by.

i’ve tested this on OF 007 and using the develop branch on github, and with xcode 3 and 4.

can you test the above first, and make sure that’s running correctly? if not, then there’s a bigger problem to deal with :slight_smile:

ok great, im treking in nepal for another 10 days so ill try when i get back to town. cheers, ill let you know how i go. :slight_smile:

hah hah, i love that you’re trekking in nepal and simultaneously working on compiling ofxCv.

Awesome, just got back and followed your steps and its working. Pretty sure i did the same thing last time. oh well thanks for the help, going to inject this into a few projects.

Programming in oF on top of the world was pretty amazing :slight_smile: