Installation of open cv 4.2 on Fedora 19

Hi All
I have installed Open CV 4.2 on fedora 19 . It seems it has installed properly . But When I am compiling a simple test application on eclipse platform it throws error .

Highlighted Below

  void setFeaturesMatcher(Ptr<detail::FeaturesMatcher> features_matcher)
          ^
In file included from /usr/local/include/opencv4/opencv2/core/cvstd.hpp:81:0,
                 from /usr/local/include/opencv4/opencv2/core/base.hpp:58,
                 from /usr/local/include/opencv4/opencv2/core.hpp:53,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:73:8: error: declaration of ‘struct cv::Ptr<cv::detail::FeaturesMatcher>’
 struct Ptr : public std::shared_ptr<T>
        ^
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:86:0,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/stitching.hpp:215:11: error: ‘features_matcher_’ was not declared in this scope
         { features_matcher_ = features_matcher; }
           ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘void cv::Stitcher::setMatchingMask(const cv::UMat&)’:
/usr/local/include/opencv4/opencv2/stitching.hpp:221:24: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::UMat’ and ‘cv::UMat’)
         matching_mask_ = mask.clone();
                        ^
/usr/local/include/opencv4/opencv2/stitching.hpp:221:24: note: candidates are:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:58:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/mat.hpp:2434:11: note: cv::UMat& cv::UMat::operator=(const cv::UMat&)
     UMat& operator = (const UMat& m);
           ^
/usr/local/include/opencv4/opencv2/core/mat.hpp:2556:11: note: cv::UMat& cv::UMat::operator=(cv::UMat)
     UMat& operator = (UMat&& m);
           ^
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:86:0,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘cv::Ptr<cv::detail::BundleAdjusterBase> cv::Stitcher::bundleAdjuster()’:
/usr/local/include/opencv4/opencv2/stitching.hpp:224:54: error: return type ‘struct cv::Ptr<cv::detail::BundleAdjusterBase>’ is incomplete
     Ptr<detail::BundleAdjusterBase> bundleAdjuster() { return bundle_adjuster_; }
                                                      ^
/usr/local/include/opencv4/opencv2/stitching.hpp:224:63: error: ‘bundle_adjuster_’ was not declared in this scope
     Ptr<detail::BundleAdjusterBase> bundleAdjuster() { return bundle_adjuster_; }
                                                               ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘const cv::Ptr<cv::detail::BundleAdjusterBase> cv::Stitcher::bundleAdjuster() const’:
/usr/local/include/opencv4/opencv2/stitching.hpp:225:66: error: return type ‘const struct cv::Ptr<cv::detail::BundleAdjusterBase>’ is incomplete
     const Ptr<detail::BundleAdjusterBase> bundleAdjuster() const { return bundle_adjuster_; }
                                                                  ^
/usr/local/include/opencv4/opencv2/stitching.hpp:225:75: error: ‘bundle_adjuster_’ was not declared in this scope
     const Ptr<detail::BundleAdjusterBase> bundleAdjuster() const { return bundle_adjuster_; }
                                                                           ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘void cv::Stitcher::setBundleAdjuster(cv::Ptr<cv::detail::BundleAdjusterBase>)’:
/usr/local/include/opencv4/opencv2/stitching.hpp:226:10: error: ‘bundle_adjuster’ has incomplete type
     void setBundleAdjuster(Ptr<detail::BundleAdjusterBase> bundle_adjuster)
          ^
In file included from /usr/local/include/opencv4/opencv2/core/cvstd.hpp:81:0,
                 from /usr/local/include/opencv4/opencv2/core/base.hpp:58,
                 from /usr/local/include/opencv4/opencv2/core.hpp:53,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:73:8: error: declaration of ‘struct cv::Ptr<cv::detail::BundleAdjusterBase>’
 struct Ptr : public std::shared_ptr<T>
        ^
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:86:0,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/stitching.hpp:227:11: error: ‘bundle_adjuster_’ was not declared in this scope
         { bundle_adjuster_ = bundle_adjuster; }
           ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘cv::Ptr<cv::detail::Estimator> cv::Stitcher::estimator()’:
/usr/local/include/opencv4/opencv2/stitching.hpp:229:40: error: return type ‘struct cv::Ptr<cv::detail::Estimator>’ is incomplete
     Ptr<detail::Estimator> estimator() { return estimator_; }
                                        ^
/usr/local/include/opencv4/opencv2/stitching.hpp:229:49: error: ‘estimator_’ was not declared in this scope
     Ptr<detail::Estimator> estimator() { return estimator_; }
                                                 ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘const cv::Ptr<cv::detail::Estimator> cv::Stitcher::estimator() const’:
/usr/local/include/opencv4/opencv2/stitching.hpp:230:52: error: return type ‘const struct cv::Ptr<cv::detail::Estimator>’ is incomplete
     const Ptr<detail::Estimator> estimator() const { return estimator_; }
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘cv::Ptr<cv::WarperCreator> cv::Stitcher::warper()’:
/usr/local/include/opencv4/opencv2/stitching.hpp:234:33: error: return type ‘struct cv::Ptr<cv::WarperCreator>’ is incomplete
     Ptr<WarperCreator> warper() { return warper_; }
                                 ^
/usr/local/include/opencv4/opencv2/stitching.hpp:234:42: error: ‘warper_’ was not declared in this scope
     Ptr<WarperCreator> warper() { return warper_; }
                                          ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘const cv::Ptr<cv::WarperCreator> cv::Stitcher::warper() const’:
/usr/local/include/opencv4/opencv2/stitching.hpp:235:45: error: return type ‘const struct cv::Ptr<cv::WarperCreator>’ is incomplete
     const Ptr<WarperCreator> warper() const { return warper_; }
                                             ^
/usr/local/include/opencv4/opencv2/stitching.hpp:235:54: error: ‘warper_’ was not declared in this scope
     const Ptr<WarperCreator> warper() const { return warper_; }
                                                      ^

In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:86:0,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/stitching.hpp:241:11: error: ‘exposure_comp_’ was not declared in this scope
         { exposure_comp_ = exposure_comp; }
           ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘cv::Ptr<cv::detail::SeamFinder> cv::Stitcher::seamFinder()’:
/usr/local/include/opencv4/opencv2/stitching.hpp:243:42: error: return type ‘struct cv::Ptr<cv::detail::SeamFinder>’ is incomplete
     Ptr<detail::SeamFinder> seamFinder() { return seam_finder_; }
                                          ^
/usr/local/include/opencv4/opencv2/stitching.hpp:243:51: error: ‘seam_finder_’ was not declared in this scope
     Ptr<detail::SeamFinder> seamFinder() { return seam_finder_; }
                                                   ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘const cv::Ptr<cv::detail::SeamFinder> cv::Stitcher::seamFinder() const’:
/usr/local/include/opencv4/opencv2/stitching.hpp:244:54: error: return type ‘const struct cv::Ptr<cv::detail::SeamFinder>’ is incomplete
     const Ptr<detail::SeamFinder> seamFinder() const { return seam_finder_; }
                                                      ^
/usr/local/include/opencv4/opencv2/stitching.hpp:244:63: error: ‘seam_finder_’ was not declared in this scope
     const Ptr<detail::SeamFinder> seamFinder() const { return seam_finder_; }
                                                               ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘void cv::Stitcher::setSeamFinder(cv::Ptr<cv::detail::SeamFinder>)’:
/usr/local/include/opencv4/opencv2/stitching.hpp:245:10: error: ‘seam_finder’ has incomplete type
     void setSeamFinder(Ptr<detail::SeamFinder> seam_finder) { seam_finder_ = seam_finder; }
          ^
In file included from /usr/local/include/opencv4/opencv2/core/cvstd.hpp:81:0,
                 from /usr/local/include/opencv4/opencv2/core/base.hpp:58,
                 from /usr/local/include/opencv4/opencv2/core.hpp:53,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:73:8: error: declaration of ‘struct cv::Ptr<cv::detail::SeamFinder>’
 struct Ptr : public std::shared_ptr<T>
        ^
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:86:0,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/stitching.hpp:245:63: error: ‘seam_finder_’ was not declared in this scope
     void setSeamFinder(Ptr<detail::SeamFinder> seam_finder) { seam_finder_ = seam_finder; }
                                                               ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘cv::Ptr<cv::detail::Blender> cv::Stitcher::blender()’:
/usr/local/include/opencv4/opencv2/stitching.hpp:247:36: error: return type ‘struct cv::Ptr<cv::detail::Blender>’ is incomplete
     Ptr<detail::Blender> blender() { return blender_; }
                                    ^
/usr/local/include/opencv4/opencv2/stitching.hpp:247:45: error: ‘blender_’ was not declared in this scope
     Ptr<detail::Blender> blender() { return blender_; }
                                             ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘const cv::Ptr<cv::detail::Blender> cv::Stitcher::blender() const’:
/usr/local/include/opencv4/opencv2/stitching.hpp:248:48: error: return type ‘const struct cv::Ptr<cv::detail::Blender>’ is incomplete
     const Ptr<detail::Blender> blender() const { return blender_; }
                                                ^
/usr/local/include/opencv4/opencv2/stitching.hpp:248:57: error: ‘blender_’ was not declared in this scope
     const Ptr<detail::Blender> blender() const { return blender_; }
                                                         ^
/usr/local/include/opencv4/opencv2/stitching.hpp: In member function ‘void cv::Stitcher::setBlender(cv::Ptr<cv::detail::Blender>)’:
/usr/local/include/opencv4/opencv2/stitching.hpp:249:10: error: ‘b’ has incomplete type
     void setBlender(Ptr<detail::Blender> b) { blender_ = b; }
          ^
In file included from /usr/local/include/opencv4/opencv2/core/cvstd.hpp:81:0,
                 from /usr/local/include/opencv4/opencv2/core/base.hpp:58,
                 from /usr/local/include/opencv4/opencv2/core.hpp:53,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:73:8: error: declaration of ‘struct cv::Ptr<cv::detail::Blender>’
 struct Ptr : public std::shared_ptr<T>
        ^
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:86:0,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/stitching.hpp:249:47: error: ‘blender_’ was not declared in this scope
     void setBlender(Ptr<detail::Blender> b) { blender_ = b; }
                                               ^
In file included from /usr/local/include/opencv4/opencv2/video.hpp:56:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:89,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/video/tracking.hpp: At global scope:
/usr/local/include/opencv4/opencv2/video/tracking.hpp:755:25: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
     virtual ~TrackerMIL() CV_OVERRIDE;
                         ^
In file included from /usr/local/include/opencv4/opencv2/video.hpp:56:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:89,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/video/tracking.hpp:802:28: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
     virtual ~TrackerGOTURN() CV_OVERRIDE;
                            ^
In file included from /usr/local/include/opencv4/opencv2/video.hpp:57:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:89,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/video/background_segm.hpp:208:92: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11 [enabled by default]
     CV_WRAP virtual void apply(InputArray image, OutputArray fgmask, double learningRate=-1) CV_OVERRIDE = 0;
                                                                                            ^
../ec.cpp: In function ‘int main(int, char**)’:
../ec.cpp:31:11: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::Mat’ and ‘cv::Mat’)
     image = imread(argv[1]);   // Read the file
           ^
../ec.cpp:31:11: note: candidates are:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:58:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/mat.hpp:1064:10: note: cv::Mat& cv::Mat::operator=(const cv::Mat&)
     Mat& operator = (const Mat& m);
          ^
/usr/local/include/opencv4/opencv2/core/mat.hpp:2092:10: note: cv::Mat& cv::Mat::operator=(cv::Mat)
     Mat& operator = (Mat&& m);
          ^
    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::AffineWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::CylindricalWarper; A1 = {float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:171:120:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::CylindricalWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::CylindricalWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::SphericalWarper; A1 = {float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:178:118:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::SphericalWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::SphericalWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::FisheyeWarper; A1 = {float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:184:116:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::FisheyeWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::FisheyeWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::StereographicWarper; A1 = {float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:190:122:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::StereographicWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::StereographicWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::CompressedRectilinearWarper; A1 = {float, float, float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:201:136:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::CompressedRectilinearWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::CompressedRectilinearWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::CompressedRectilinearPortraitWarper; A1 = {float, float, float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:212:144:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::CompressedRectilinearPortraitWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::CompressedRectilinearPortraitWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::PaniniWarper; A1 = {float, float, float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:223:121:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::PaniniWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::PaniniWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::PaniniPortraitWarper; A1 = {float, float, float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:234:129:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::PaniniPortraitWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::PaniniPortraitWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::MercatorWarper; A1 = {float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:240:117:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::MercatorWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::MercatorWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp: In instantiation of ‘cv::Ptr<_Tp> cv::makePtr(const A1& ...) [with _Tp = cv::detail::TransverseMercatorWarper; A1 = {float}]’:
/usr/local/include/opencv4/opencv2/stitching/warpers.hpp:246:127:   required from here
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:143:10: error: return type ‘struct cv::Ptr<cv::detail::TransverseMercatorWarper>’ is incomplete
 Ptr<_Tp> makePtr(const A1&... a1)
          ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:20: error: ‘value’ is not a member of ‘cv::has_custom_delete<cv::detail::TransverseMercatorWarper, void>’
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                    ^
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:145:103: error: ‘static_assert’ was not declared in this scope
     static_assert( !has_custom_delete<_Tp>::value, "Can't use this makePtr with custom DefaultDeleter");
                                                                                                       ^
In file included from /usr/include/c++/4.8.3/vector:69:0,
                 from /usr/local/include/opencv4/opencv2/core/types.hpp:53,
                 from /usr/local/include/opencv4/opencv2/core.hpp:57,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/include/c++/4.8.3/bits/vector.tcc: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = cv::Rect_<int>; _Alloc = std::allocator<cv::Rect_<int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<cv::Rect_<int>*, std::vector<cv::Rect_<int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = cv::Rect_<int>*]’:
ector.tcc:335:16: note: candidates are:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:57:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/types.hpp:1852:13: note: cv::Rect_<_Tp>& cv::Rect_<_Tp>::operator=(const cv::Rect_<_Tp>&) [with _Tp = int]
 Rect_<_Tp>& Rect_<_Tp>::operator = ( const Rect_<_Tp>& r )
             ^
/usr/local/include/opencv4/opencv2/core/types.hpp:1862:13: note: cv::Rect_<_Tp>& cv::Rect_<_Tp>::operator=(cv::Rect_<_Tp>) [with _Tp = int]
 Rect_<_Tp>& Rect_<_Tp>::operator = ( Rect_<_Tp>&& r ) CV_NOEXCEPT
             ^
/usr/local/include/opencv4/opencv2/core/types.hpp: In instantiation of ‘static _OI std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(_II, _II, _OI) [with _II = const cv::KeyPoint*; _OI = cv::KeyPoint*]’:
/usr/include/c++/4.8.3/bits/stl_algobase.h:390:70:   required from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const cv::KeyPoint*; _OI = cv::KeyPoint*]’
/usr/include/c++/4.8.3/bits/stl_algobase.h:428:38:   required from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator<const cv::KeyPoint*, std::vector<cv::KeyPoint> >; _OI = __gnu_cxx::__normal_iterator<cv::KeyPoint*, std::vector<cv::KeyPoint> >]’
/usr/include/c++/4.8.3/bits/stl_algobase.h:460:17:   required from ‘_OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<const cv::KeyPoint*, std::vector<cv::KeyPoint> >; _OI = __gnu_cxx::__normal_iterator<cv::KeyPoint*, std::vector<cv::KeyPoint> >]’
/usr/include/c++/4.8.3/bits/vector.tcc:199:63:   required from ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = cv::KeyPoint; _Alloc = std::allocator<cv::KeyPoint>]’
/usr/local/include/opencv4/opencv2/core/persistence.hpp:1197:13:   required from here
/usr/local/include/opencv4/opencv2/core/types.hpp:711:27: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::Point2f {aka cv::Point_<float>}’ and ‘const Point2f {aka const cv::Point_<float>}’)
 class CV_EXPORTS_W_SIMPLE KeyPoint
                           ^
/usr/local/include/opencv4/opencv2/core/types.hpp:711:27: note: candidates are:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:57:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/types.hpp:170:13: note: cv::Point_<_Tp>& cv::Point_<_Tp>::operator=(const cv::Point_<_Tp>&) [with _Tp = float]
     Point_& operator = (const Point_& pt);
             ^
/usr/local/include/opencv4/opencv2/core/types.hpp:171:13: note: cv::Point_<_Tp>& cv::Point_<_Tp>::operator=(cv::Point_<_Tp>) [with _Tp = float; cv::Point_<_Tp> = cv::Point_<float>]
     Point_& operator = (Point_&& pt) CV_NOEXCEPT;
             ^
In file included from /usr/include/c++/4.8.3/algorithm:61:0,
                 from /usr/local/include/opencv4/opencv2/core/base.hpp:55,
                 from /usr/local/include/opencv4/opencv2/core.hpp:53,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/include/c++/4.8.3/bits/stl_algobase.h:335:18: note: synthesized method ‘cv::KeyPoint& cv::KeyPoint::operator=(const cv::KeyPoint&)’ first required here 
        *__result = *__first;
                  ^
/usr/include/c++/4.8.3/bits/stl_algobase.h: In instantiation of ‘static _BI2 std::__copy_move_backward<false, false, std::random_access_iterator_tag>::__copy_move_b(_BI1, _BI1, _BI2) [with _BI1 = cv::Rect_<int>*; _BI2 = cv::Rect_<int>*]’:
/usr/include/c++/4.8.3/bits/stl_algobase.h:587:18:   required from ‘_BI2 std::__copy_move_backward_a(_BI1, _BI1, _BI2) [with bool _IsMove = false; _BI1 = cv::Rect_<int>*; _BI2 = cv::Rect_<int>*]’
/usr/include/c++/4.8.3/bits/stl_algobase.h:596:33:   required from ‘_BI2 std::__copy_move_backward_a2(_BI1, _BI1, _BI2) [with bool _IsMove = false; _BI1 = cv::Rect_<int>*; _BI2 = cv::Rect_<int>*]’
/usr/include/c++/4.8.3/bits/stl_algobase.h:631:17:   required from ‘_BI2 std::copy_backward(_BI1, _BI1, _BI2) [with _BI1 = cv::Rect_<int>*; _BI2 = cv::Rect_<int>*]’
/usr/include/c++/4.8.3/bits/vector.tcc:331:4:   required from ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = cv::Rect_<int>; _Alloc = std::allocator<cv::Rect_<int> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<cv::Rect_<int>*, std::vector<cv::Rect_<int> > >; typename std::_Vector_base<_Tp, _Alloc>::pointer = cv::Rect_<int>*]’
/usr/include/c++/4.8.3/bits/stl_vector.h:913:28:   required from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = cv::Rect_<int>; _Alloc = std::allocator<cv::Rect_<int> >; std::vector<_Tp, _Alloc>::value_type = cv::Rect_<int>]’
/usr/local/include/opencv4/opencv2/objdetect/detection_based_tracker.hpp:193:45:   required from here
/usr/include/c++/4.8.3/bits/stl_algobase.h:537:18: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::Rect_<int>’ and ‘cv::Rect_<int>’)
      *--__result = *--__last;
                  ^
/usr/include/c++/4.8.3/bits/stl_algobase.h:537:18: note: candidates are:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:57:0,
                 from /usr/local/include/opencv4/opencv2/opencv.hpp:52,
                 from ../ec.cpp:15:
/usr/local/include/opencv4/opencv2/core/types.hpp:1852:13: note: cv::Rect_<_Tp>& cv::Rect_<_Tp>::operator=(const cv::Rect_<_Tp>&) [with _Tp = int]
 Rect_<_Tp>& Rect_<_Tp>::operator = ( const Rect_<_Tp>& r )
             ^
/usr/local/include/opencv4/opencv2/core/types.hpp:1862:13: note: cv::Rect_<_Tp>& cv::Rect_<_Tp>::operator=(cv::Rect_<_Tp>) [with _Tp = int]
 Rect_<_Tp>& Rect_<_Tp>::operator = ( Rect_<_Tp>&& r ) CV_NOEXCEPT
             ^
make: *** [ec.o] Error 1

12:54:16 Build Finished (took 19s.692ms)

I have removed some of errors as I was unable to post all the error log
Not Sure about the issue . Eclipse version is KEPLER
Thanks in advance

how exactly did you do that ? why such an outdated version ? (current is 4.5.2)

what does g++ --version tell ? maybe you need to tell it the c++ std to use , like

g++ -std=c++11 ...