build without opencv_contribe, make and make install successfully. build my own example successfully.
but when i add:
#include
compile error:
In file included from /opt/local/include/opencv2/dnn/dnn.hpp:57:0,
from /opt/local/include/opencv2/dnn.hpp:62,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dict.hpp:63:21: error: expected ‘)’ before ‘i’
DictValue(int64 i = 0) : type(Param::INT), pi(new AutoBuffer) { (*pi)[0] = i; } //!< Constructs integer scalar
^
In file included from /opt/local/include/opencv2/dnn/dnn.hpp:57:0,
from /opt/local/include/opencv2/dnn.hpp:62,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dict.hpp:102:28: error: template argument 1 is invalid
AutoBuffer *pi;
^
/opt/local/include/opencv2/dnn/dict.hpp:102:28: error: template argument 2 is invalid
/opt/local/include/opencv2/dnn/dict.hpp: In constructor ‘cv::dnn::experimental_dnn_v3::DictValue::DictValue(int)’:
/opt/local/include/opencv2/dnn/dict.hpp:64:86: error: template argument 1 is invalid
CV_WRAP DictValue(int i) : type(Param::INT), pi(new AutoBuffer) { (*pi)[0] = i; } //!< Constructs integer scalar
^
/opt/local/include/opencv2/dnn/dict.hpp:64:86: error: template argument 2 is invalid
/opt/local/include/opencv2/dnn/dict.hpp:64:98: error: invalid types ‘int[int]’ for array subscript
CV_WRAP DictValue(int i) : type(Param::INT), pi(new AutoBuffer) { (*pi)[0] = i; } //!< Constructs integer scalar
^
/opt/local/include/opencv2/dnn/dict.hpp: In constructor ‘cv::dnn::experimental_dnn_v3::DictValue::DictValue(unsigned int)’:
/opt/local/include/opencv2/dnn/dict.hpp:65:78: error: template argument 1 is invalid
DictValue(unsigned p) : type(Param::INT), pi(new AutoBuffer) { (*pi)[0] = p; } //!< Constructs integer scalar
^
/opt/local/include/opencv2/dnn/dict.hpp:65:78: error: template argument 2 is invalid
/opt/local/include/opencv2/dnn/dict.hpp:65:90: error: invalid types ‘int[int]’ for array subscript
DictValue(unsigned p) : type(Param::INT), pi(new AutoBuffer) { (*pi)[0] = p; } //!< Constructs integer scalar
^
In file included from /opt/local/include/opencv2/dnn.hpp:62:0,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.hpp: At global scope:
/opt/local/include/opencv2/dnn/dnn.hpp:305:17: error: reference to ‘int64’ is ambiguous
virtual int64 getFLOPS(const std::vector &inputs,
^
In file included from /opt/local/include/opencv2/core/cvdef.h:91:0,
from /opt/local/include/opencv2/core.hpp:52,
from /opt/local/include/opencv2/core/core.hpp:48,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv/cv_image.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv.h:10,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:6:
/opt/local/include/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64
typedef int64_t int64;
^
In file included from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../algs.h:87:0,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/rectangle.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/object_detector.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/frontal_face_detector.h:7,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:3:
/home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../uintn.h:27:23: note: typedef long long int dlib::int64
typedef long long int64;
^
In file included from /opt/local/include/opencv2/dnn.hpp:62:0,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.hpp:305:17: error: ‘int64’ does not name a type
virtual int64 getFLOPS(const std::vector &inputs,
^
/opt/local/include/opencv2/dnn/dnn.hpp:527:17: error: reference to ‘int64’ is ambiguous
CV_WRAP int64 getFLOPS(const std::vector& netInputShapes) const;
^
In file included from /opt/local/include/opencv2/core/cvdef.h:91:0,
from /opt/local/include/opencv2/core.hpp:52,
from /opt/local/include/opencv2/core/core.hpp:48,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv/cv_image.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv.h:10,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:6:
/opt/local/include/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64
typedef int64_t int64;
^
In file included from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../algs.h:87:0,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/rectangle.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/object_detector.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/frontal_face_detector.h:7,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:3:
/home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../uintn.h:27:23: note: typedef long long int dlib::int64
typedef long long int64;
^
In file included from /opt/local/include/opencv2/dnn.hpp:62:0,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.hpp:527:17: error: ‘int64’ does not name a type
CV_WRAP int64 getFLOPS(const std::vector& netInputShapes) const;
^
/opt/local/include/opencv2/dnn/dnn.hpp:529:17: error: reference to ‘int64’ is ambiguous
CV_WRAP int64 getFLOPS(const MatShape& netInputShape) const;
^
In file included from /opt/local/include/opencv2/core/cvdef.h:91:0,
from /opt/local/include/opencv2/core.hpp:52,
from /opt/local/include/opencv2/core/core.hpp:48,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv/cv_image.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv.h:10,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:6:
/opt/local/include/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64
typedef int64_t int64;
^
In file included from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../algs.h:87:0,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/rectangle.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/object_detector.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/frontal_face_detector.h:7,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:3:
/home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../uintn.h:27:23: note: typedef long long int dlib::int64
typedef long long int64;
^
In file included from /opt/local/include/opencv2/dnn.hpp:62:0,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.hpp:529:17: error: ‘int64’ does not name a type
CV_WRAP int64 getFLOPS(const MatShape& netInputShape) const;
^
/opt/local/include/opencv2/dnn/dnn.hpp:531:17: error: reference to ‘int64’ is ambiguous
CV_WRAP int64 getFLOPS(const int layerId,
^
In file included from /opt/local/include/opencv2/core/cvdef.h:91:0,
from /opt/local/include/opencv2/core.hpp:52,
from /opt/local/include/opencv2/core/core.hpp:48,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv/cv_image.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv.h:10,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:6:
/opt/local/include/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64
typedef int64_t int64;
^
In file included from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../algs.h:87:0,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/rectangle.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/object_detector.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/frontal_face_detector.h:7,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:3:
/home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../uintn.h:27:23: note: typedef long long int dlib::int64
typedef long long int64;
^
In file included from /opt/local/include/opencv2/dnn.hpp:62:0,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.hpp:531:17: error: ‘int64’ does not name a type
CV_WRAP int64 getFLOPS(const int layerId,
^
/opt/local/include/opencv2/dnn/dnn.hpp:534:17: error: reference to ‘int64’ is ambiguous
CV_WRAP int64 getFLOPS(const int layerId,
^
In file included from /opt/local/include/opencv2/core/cvdef.h:91:0,
from /opt/local/include/opencv2/core.hpp:52,
from /opt/local/include/opencv2/core/core.hpp:48,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv/cv_image.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv.h:10,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:6:
/opt/local/include/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64
typedef int64_t int64;
^
In file included from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../algs.h:87:0,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/rectangle.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/object_detector.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/frontal_face_detector.h:7,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:3:
/home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../uintn.h:27:23: note: typedef long long int dlib::int64
typedef long long int64;
^
In file included from /opt/local/include/opencv2/dnn.hpp:62:0,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.hpp:534:17: error: ‘int64’ does not name a type
CV_WRAP int64 getFLOPS(const int layerId,
^
/opt/local/include/opencv2/dnn/dnn.hpp:596:17: error: reference to ‘int64’ is ambiguous
CV_WRAP int64 getPerfProfile(CV_OUT std::vector& timings);
^
In file included from /opt/local/include/opencv2/core/cvdef.h:91:0,
from /opt/local/include/opencv2/core.hpp:52,
from /opt/local/include/opencv2/core/core.hpp:48,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv/cv_image.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv.h:10,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:6:
/opt/local/include/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64
typedef int64_t int64;
^
In file included from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../algs.h:87:0,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/rectangle.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/object_detector.h:7,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/frontal_face_detector.h:7,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:3:
/home/zero/Code/dlib/dlib-2/dlib/../dlib/image_processing/../image_processing/../geometry/../uintn.h:27:23: note: typedef long long int dlib::int64
typedef long long int64;
^
In file included from /opt/local/include/opencv2/dnn.hpp:62:0,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.hpp:596:17: error: ‘int64’ does not name a type
CV_WRAP int64 getPerfProfile(CV_OUT std::vector& timings);
^
In file included from /opt/local/include/opencv2/dnn/dnn.hpp:755:0,
from /opt/local/include/opencv2/dnn.hpp:62,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:23:
/opt/local/include/opencv2/dnn/dnn.inl.hpp: In static member function ‘static cv::dnn::experimental_dnn_v3::DictValue cv::dnn::experimental_dnn_v3::DictValue::arrayInt(TypeIter, int)’:
/opt/local/include/opencv2/dnn/dnn.inl.hpp:54:54: error: template argument 1 is invalid
DictValue res(Param::INT, new AutoBuffer(size));
^
/opt/local/include/opencv2/dnn/dnn.inl.hpp:54:54: error: template argument 2 is invalid
/opt/local/include/opencv2/dnn/dnn.inl.hpp:56:20: error: invalid types ‘int[int]’ for array subscript
(*res.pi)[j] = *begin;
^
/opt/local/include/opencv2/dnn/dnn.inl.hpp: At global scope:
/opt/local/include/opencv2/dnn/dnn.inl.hpp:86:8: error: reference to ‘int64’ is ambiguous
inline int64 DictValue::get(int idx) const
^
In file included from /opt/local/include/opencv2/core/cvdef.h:91:0,
from /opt/local/include/opencv2/core.hpp:52,
from /opt/local/include/opencv2/core/core.hpp:48,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv/cv_image.h:6,
from /home/zero/Code/dlib/dlib-2/dlib/../dlib/opencv.h:10,
from /home/zero/Code/dlib/dlib-2/examples/face.cpp:6:
/opt/local/include/opencv2/core/hal/interface.h:61:20: note: candidates are: typedef int64_t int64
typedef int64_t int64;
↧