Undefined reference to ofToDataPath()

Hallo Leute
I’m trying to run a project in QtCreator in Ubuntu, involving ofxOpencv and ofxKinect but I’m getting this

/home/myUserName/openFrameworks/addons/ofxOpenCv/src/ofxCvHaarFinder.cpp:56: error: undefined reference to 'ofToDataPath[abi:cxx11](boost::filesystem::path const&, bool)'

the reference to this function starts here when I call:

haar.setup("haarcascade_frontalface_default.xml");

in my ofApp.cpp

it’s been a while for me away from software development, but it seems to me it is a problem with an undefined path variable or something. Still I’m a bit rusty to get around and fix it, so I hope for the best with the help I could get from here.

Also I’d like to know if there is ways to check on this variables before hand or any other recommended way to debug this out

Very much appreciated and thanks in advance <3

Hi @cruffoc , are you using the OF nightly build, or the last release (0.11.2)? The nightly build supports c++17 and there were some changes to how it handles the file system.

It’s been several months since I last used linux, but I was having to add a flag in the .qbs file to tell Qt Creator to compile the project with c++17 when using the nightly build:

of.cxxFlags: ['-std=c++17' ]         // flags passed to the c++ compiler

this resolved my issues with the nightly build.
thanks @TimChi

1 Like