mat.hpp error: call to member function 'ptr' is ambiguous

asked 2013-12-06 04:49:16 -0600

Athanase gravatar image

Hi there, I have an error when I compile my program that uses OpenCV just by including #include <opencv2/core/core.hpp>, which is:

In file included from /usr/local/include/opencv2/core/core.hpp:4826:
/usr/local/include/opencv2/core/mat.hpp:2212:37: error: call to member function 'ptr' is ambiguous
{ return *(_Tp*)((SparseMat*)this)->ptr(i0, true, hashval); }
            ~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/include/opencv2/core/core.hpp:3507:12: note: candidate function
    uchar* ptr(int i0, bool createMissing, size_t* hashval=0);
       ^
/usr/local/include/opencv2/core/core.hpp:3509:12: note: candidate function
    uchar* ptr(int i0, int i1, bool createMissing, size_t* hashval=0);
       ^
/usr/local/include/opencv2/core/core.hpp:3513:12: note: candidate function not viable: no known    conversion from 'int' to 'const int *' for 1st argument; take the address of the argument with &
    uchar* ptr(const int* idx, bool createMissing, size_t* hashval=0);
       ^
/usr/local/include/opencv2/core/core.hpp:3511:12: note: candidate function not viable: requires at least 4 arguments, but 3 were provided
uchar* ptr(int i0, int i1, int i2, bool createMissing, size_t* hashval=0);
       ^

I configured and compiled OpenCV 2.4.7 with the following option: cmake -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_FLAGS="-m64 -Wno-c++11-narrowing -std=c++11" -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_BUILD_TYPE=Debug ...

I use Linux (ubuntu 13.04) and I use clang 3.2-1.

Thanks for the answers !

edit retag flag offensive close merge delete

Comments

same err without c++11 ?

berak gravatar imageberak ( 2013-12-06 05:02:04 -0600 )edit

Yes still the same !

Athanase gravatar imageAthanase ( 2013-12-06 05:14:18 -0600 )edit

Nobody ????????????

Athanase gravatar imageAthanase ( 2013-12-09 03:05:04 -0600 )edit

Any ideas ?

Athanase gravatar imageAthanase ( 2013-12-23 07:05:24 -0600 )edit