attempting to compile the examples that come with ofxcv

I have compiling errors (attached image) when trying to compile ofxcv library. I am using xcode 4.3.2, OF 007 and attempting to compile the examples that come with ofxcv. Sorry if this can be referenced to somewhere else on the forum or is obvious. All help is appreciated.

errors are

Utillities.h

Semantic Issue
Call to function ‘toCv’ that is neither visible in the template definition nor found by argument-dependent lookup

In file included from /Users/LeeLee/Documents/of_preRelease_v007_osx/apps/ofxCv_Example/example-background/…/libs/ofxCv/src/Helpers.cpp:2:

In instantiation of function template specialization ‘ofxCv::copy<cv::Mat, cv::Mat>’ requested here
‘toCv’ should be declared prior to the call site or in namespace ‘cv’

Semantic Issue
Call to function ‘toCv’ that is neither visible in the template definition nor found by argument-dependent lookup

In file included from /Users/LeeLee/Documents/of_preRelease_v007_osx/apps/ofxCv_Example/example-background/…/libs/ofxCv/src/Helpers.cpp:2:

‘toCv’ should be declared prior to the call site or in namespace ‘cv’

http://www.flickr.com/photos/antisuji/7755111206/

I’m running into a similar issue while running some of the example files from ofxCv. I bumped into this, which might be somewhat related: http://forum.openframeworks.cc/t/ofxcv-compile-error-fixed/9203/0, but I’m not too sure where to go from here.

Any help would be much appreciated!

Hey, Yeah I was hit with this issue too.

I posted a issue on ofxCv here:
https://github.com/kylemcdonald/ofxCv/issues/52

Definitely a problem with the ordering of the declaration of the toCv function in Xcode.

You can fix it yourself (before issue fixed on git) by re-ordering the Utilities.h function

"Move the declaration of the function causing the problem above the copy function.

I.E. All the code from Line 157 - 179 and placed it at Line 137 of Utilities.h"

if danoli3 (or anyone) could submit a PR for this fix i’d be glad to accept it – sorry that this is a problem, i’m still living in gcc land :slight_smile:

I’ve had 1 foot off the grid this last week. I’ll give it a try tonight. Thax so much for the help.

nice work danoli3 :slight_smile: