[Bug 687237] OpenCV elements compile with 2.4.2

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Nov 2 09:34:36 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=687237
  GStreamer | gst-plugins-bad | 1.x

--- Comment #4 from Cygwin Ports maintainer <yselkowitz at users.sourceforge.net> 2012-11-02 16:34:31 UTC ---
(In reply to comment #2)
>   CC       libgstopencv_la-gstpyramidsegment.lo
> gstpyramidsegment.c: In function 'gst_pyramid_segment_chain':
> gstpyramidsegment.c:307:3: error: implicit declaration of function
> 'cvPyrSegmentation' [-Werror=implicit-function-declaration]
> gstpyramidsegment.c:307:3: error: nested extern declaration of
> 'cvPyrSegmentation' [-Werror=nested-externs]
> cc1: all warnings being treated as errors

I was building from the 1.0.2 (and 0.10.23) tarballs, hence no -Werror for me.
:-(

> I can't see how it could build with 2.4.2 since cvPyrSegmentation has been
> moved to the "legacy" stuff, which is in $INCLUDEDIR/opencv2/legacy.hpp

In 2.4.2, that's <opencv2/legacy/legacy.hpp>.

> That code is deactivated since we build with CV_NO_BACKWARD_COMPATIBILITY

Actually, that macro is documented in a different header, namely
<opencv2/legacy/compat.hpp>, but nowhere in the 2.4.2 headers is it actually
used.  In any case, compat.hpp does not #include legacy.hpp.

I was able to quiet the warnings by adding the following to either of
gstpyramidsegment.{c,h} (after the other #includes):

#if CV_MAJOR_VERSION * 100 + CV_MINOR_VERSION >= 204
#include <opencv2/legacy/legacy.hpp>
#endif

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list