kylemcdonald / ofxCv

Alternative approach to interfacing with OpenCv from openFrameworks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples fail to build (ofxcv/develop, OF.0.9/master, OS X 10.10.4)

nylki opened this issue · comments

I freshly cloned OF from master, cloned ofxCv from branch develop and executed update-projects.py.
When trying to build any example or my own (empty) project using ofxCv, ofxOpencv and ofxFacetracker I get several errors.

Building example-empty:

In file included from src/main.cpp:1:
In file included from ./src/ofApp.h:4:
In file included from ../../../addons/ofxCv/src/ofxCv.h:4:
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/opencv.hpp:56:
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ml/ml.hpp:961:18: warning: 'CvForestTree::train' hides overloaded virtual functions [-Woverloaded-virtual]
    virtual bool train( CvDTreeTrainData* trainData, const CvMat* _subsample_idx, CvRTrees* forest );
                 ^
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ml/ml.hpp:867:18: note: hidden overloaded virtual function 'CvDTree::train' declared here: different number of parameters (2 vs 3)
    virtual bool train( CvMLData* trainData, CvDTreeParams params=CvDTreeParams() );
                 ^
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ml/ml.hpp:877:26: note: hidden overloaded virtual function 'CvDTree::train' declared here: different number of parameters (8 vs 3)
    CV_WRAP virtual bool train( const cv::Mat& trainData, int tflag,
                         ^
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ml/ml.hpp:1149:18: warning: 'CvBoostTree::train' hides overloaded virtual functions [-Woverloaded-virtual]
    virtual bool train( CvDTreeTrainData* trainData,
                 ^
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ml/ml.hpp:867:18: note: hidden overloaded virtual function 'CvDTree::train' declared here: different number of parameters (2 vs 3)
    virtual bool train( CvMLData* trainData, CvDTreeParams params=CvDTreeParams() );
                 ^
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ml/ml.hpp:877:26: note: hidden overloaded virtual function 'CvDTree::train' declared here: different number of parameters (8 vs 3)
    CV_WRAP virtual bool train( const cv::Mat& trainData, int tflag,
                         ^
In file included from src/main.cpp:1:
In file included from ./src/ofApp.h:4:
In file included from ../../../addons/ofxCv/src/ofxCv.h:9:
../../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:43:41: error: no member named 'glTypeInternal' in 'ofTextureData'
        int type = tex.getTextureData().glTypeInternal;
                   ~~~~~~~~~~~~~~~~~~~~ ^
../../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:102:41: error: no member named 'glTypeInternal' in 'ofTextureData'
        int type = tex.getTextureData().glTypeInternal;
                   ~~~~~~~~~~~~~~~~~~~~ ^
In file included from src/main.cpp:1:
In file included from ./src/ofApp.h:4:
In file included from ../../../addons/ofxCv/src/ofxCv.h:22:
../../../addons/ofxCv/libs/ofxCv/include/ofxCv/Calibration.h:96:8: warning: 'ofxCv::Calibration::draw' hides overloaded virtual function [-Woverloaded-virtual]
                void draw(int i) const;
                     ^
../../../libs/openFrameworks/3d/ofNode.h:227:15: note: hidden overloaded virtual function 'ofNode::draw' declared here: different number of parameters (0 vs 1)
        virtual void draw() const;
                     ^
3 warnings and 2 errors generated.
make[1]: *** [obj/osx/Release/src/main.o] Error 1
make: *** [Release] Error 2

the errors:

In file included from src/main.cpp:1:
In file included from ./src/ofApp.h:4:
In file included from ../../../addons/ofxCv/src/ofxCv.h:9:
../../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:43:41: error: no member named 'glTypeInternal' in 'ofTextureData'
        int type = tex.getTextureData().glTypeInternal;
                   ~~~~~~~~~~~~~~~~~~~~ ^
../../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:102:41: error: no member named 'glTypeInternal' in 'ofTextureData'
        int type = tex.getTextureData().glTypeInternal;
                   ~~~~~~~~~~~~~~~~~~~~ ^

Do I need a different branch (I tried ofxCv master, but there are errors too)? I had them working previously with 0.9, not sure whats the issue now.
thanks for any help! :)

I checkout out OF from May 15 (the day you last commited changes to ofxCv).
When Building with XCode (make reported issues with the architecture, so I tried XCode) the example-empty builds just fine. My Project-Generator generated own app with ofxCV and ofxFaceTracker builds fine asell with the May 15 OF.

I suppose something changed in the master of OF in the last two month.

Just that you know: ofxFaceTracker and ofxCv work fine with OF 0.8.4. (with ofxCv for 0.8.4 and ofxFaceTracker from master)

thanks for this very thorough research, let me see if i can bring the develop branch up to date.

not sure what the error was but it's closed with d653350

great!

Hey @kylemcdonald.
It's really strange right now. I am on OF 0.9RC1 and freshly cloned ofxCv.
The exact same error persists, when building example-empty. Even now with the version from May 15.

In file included from /Users/bwg/Programming/of_v0.9.0RC1_osx_release/addons/ofxCv/example-empty/src/main.cpp:1:
In file included from /Users/bwg/Programming/of_v0.9.0RC1_osx_release/addons/ofxCv/example-empty/src/ofApp.h:4:
In file included from ../../../addons/ofxCv/src/ofxCv.h:9:
../../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:43:41: error: no member named 'glTypeInternal' in 'ofTextureData'
        int type = tex.getTextureData().glTypeInternal;
                   ~~~~~~~~~~~~~~~~~~~~ ^
../../../addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:102:41: error: no member named 'glTypeInternal' in 'ofTextureData'
        int type = tex.getTextureData().glTypeInternal;

The thing is, those two errors pop-up in another bigger project of mine, which I can't build anymore. But if it persists in one of the examples, it might not have to do with my setup? I am kinda lost right now on how to proceed.

hmm this was definitely not fixed. glTypeInternal doesn't exist in OF anymore, but it still exists in the develop branch of ofxCv.

argh, whoops -- nope, i was wrong. this is fixed. if you see glTypeInternal anywhere, you're using master and need to switch to develop.

You are right! I wasn't on develop. I thought I was, otherwise I would not have opened an issue. sorry about that! 😊