我有一個錯誤,當我編譯我的程序,它使用了OpenCV只是其中的#include,這就是:OpenCV的鐺mat.hpp錯誤:調用成員函數「PTR」不明確
In file included from /usr/local/include/opencv2/highgui/highgui.hpp:46:
In file included from /usr/local/include/opencv2/core/core.hpp:4826:
/usr/local/include/opencv2/core/mat.hpp:2248:42: error: call to member function 'ptr' is ambiguous
{ return (const _Tp*)((SparseMat*)this)->ptr(i0, false, 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);
我試過多次(最近)版本的OpenCV,但在我的情況下,他們都沒有工作。 OpenCV是否正式不支持Clang,還是我應該報告的錯誤? 我使用的是Linux(ubuntu 13.04),我使用了clang 3.2-1。
好的,所以我認爲我們可以說OpenCV並不完全支持Clang(並且根本不支持)。 – Athanase