kylemcdonald / ofxCv

Alternative approach to interfacing with OpenCv from openFrameworks.
Other
657 stars 276 forks source link

Flow.obj : error LNK2019 #115

Closed AlexandreFiset closed 10 years ago

AlexandreFiset commented 10 years ago

Hi there,

I installed VS Express 2012 on W8, the latest versions of both OpenFrameworks and OfxCv and when I try to build an example project, those two errors pops up:

1>Flow.obj : error LNK2019: symbole externe non résolu "public: int thiscall ofxCv::FlowPyrLK::getWidth(void)" (?getWidth@FlowPyrLK@ofxCv@@QAEHXZ) référencé dans la fonction "protected: virtual void thiscall ofxCv::FlowPyrLK::drawFlow(class ofRectangle)" (?drawFlow@FlowPyrLK@ofxCv@@MAEXVofRectangle@@@Z) 1>Flow.obj : error LNK2019: symbole externe non résolu "public: int thiscall ofxCv::FlowPyrLK::getHeight(void)" (?getHeight@FlowPyrLK@ofxCv@@QAEHXZ) référencé dans la fonction "protected: virtual void thiscall ofxCv::FlowPyrLK::drawFlow(class ofRectangle)" (?drawFlow@FlowPyrLK@ofxCv@@MAEXVofRectangle@@@Z)

In the meantime, I'll try Code:Blocks to see if the same problem occurs.

AlexandreFiset commented 10 years ago

I confirm that it also happens in Code:Blocks. Same errors:

obj\release\addons\ofxCv\libs\ofxCv\src\Flow.o:Flow.cpp|| undefined reference to ofxCv::FlowPyrLK::getHeight()'| obj\release\addons\ofxCv\libs\ofxCv\src\Flow.o:Flow.cpp|| undefined reference toofxCv::FlowPyrLK::getWidth()'|

eranws commented 10 years ago

It seems like FlowPyrLK inherits from flow, but since it declares in Flow.h getWidth(), getHeight() the error is raised. You can remove those lines (83,84) from Flow.h in order to complie - but I'm not sure how @kylemcdonald intended to draw the flow pyramid...

kylemcdonald commented 10 years ago

thanks for the bug report, i made some changes to optimize and clean up Flow recently and forgot to remove those methods. please pull again (or comment out the overwritten and unimplemented methods). let me know if you find any other problems with Flow :)

eranws commented 10 years ago

Hi, thanks! (oF is awesome!)

there is similar issue with Tracker, being used by ContourFinder / ObjectFinder... I'll open an issue for that