Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode w/ LLVM - Call to function 'toCv' in Utilities.h fails #52

Closed
danoli3 opened this issue Aug 19, 2012 · 4 comments
Closed

Xcode w/ LLVM - Call to function 'toCv' in Utilities.h fails #52

danoli3 opened this issue Aug 19, 2012 · 4 comments

Comments

@danoli3
Copy link
Contributor

danoli3 commented Aug 19, 2012

Using Xcode 4.3.2 and OF 007 the following error occurs when compiling with ofxCv (current master).

"Call to function 'toCv' that is neither visible in the template definition nor found by argument-dependent lookup"

The source of the issue: Line 134 of Utilities.h

// cross-toolkit, cross-bitdepth copying
    template <class S, class D>
    void copy(S& src, D& dst, int dstDepth) {
        imitate(dst, src, getCvImageType(getChannels(src), dstDepth));
        Mat srcMat = toCv(src), dstMat = toCv(dst);         // ------------------------ Error
        if(srcMat.type() == dstMat.type()) {
            srcMat.copyTo(dstMat);
        } else {
            double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);
            srcMat.convertTo(dstMat, dstMat.depth(), alpha);
        }
    }

Two other programmers have the same issue with same configuration:
http://forum.openframeworks.cc/index.php?topic=10479.0

@danoli3
Copy link
Contributor Author

danoli3 commented Aug 19, 2012

My solution: 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

Seems like a re-ordering issue again for Xcode.

-Dan :)

@kylemcdonald
Copy link
Owner

wow, can't believe that llvm has these kind of issues.

could you do me a huge favor and do a pull request for the fix that works for you?

i'm still using gcc, but llvm compatibility is important to me, and i just don't have the right setup to test it on atm.

@danoli3
Copy link
Contributor Author

danoli3 commented Aug 23, 2012

Added Pull Request :)
#53

@kylemcdonald
Copy link
Owner

closed by #53

arturoc pushed a commit to arturoc/openFrameworks that referenced this issue Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants