Opened 11 years ago

Closed 11 years ago

#221 closed defect (fixed)

OpenCV and cxtypes.h

Reported by: greybones Owned by: Michael Niedermayer
Priority: normal Component: build system
Version: git-master Keywords: OpenCV
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes


I have the latest released OpenCV (0.2.2) and it doesn't have this file referenced in your latest git build (20110518)

here is the compile error...
CC libavfilter/vf_libopencv.o
CC libavfilter/vf_mp.o
libavfilter/vf_libopencv.c:29:28: fatal error: opencv/cxtypes.h: No such file or directory
compilation terminated.
make: * [libavfilter/vf_libopencv.o] Error 1
* Waiting for unfinished jobs....
libavfilter/vf_mp.c: In function 'vf_get_image':
libavfilter/vf_mp.c:467:19: warning: initialization from incompatible pointer type
libavfilter/vf_mp.c: In function 'vf_next_put_image':
libavfilter/vf_mp.c:639:36: warning: assignment from incompatible pointer type
libavfilter/vf_mp.c: In function 'init':
libavfilter/vf_mp.c:785:5: warning: passing argument 2 of 'm->>vf_open' discards qualifiers from pointer target type
libavfilter/vf_mp.c:785:5: note: expected 'char *' but argument is of type 'const char *'

hope this help! let me know if you need more info..
i'm on slackware64-current

Attachments (1)

patchopencv.diff (372 bytes ) - added by Carl Eugen Hoyos 11 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by greybones, 11 years ago

type sorry my opencv version is 2.2.0
i also did a find against the opencv code and my open include, this file doesn't exist in either.

comment:2 by Carl Eugen Hoyos, 11 years ago

Component: FFmpegbuild system
Status: newopen
Version: gitgit-master

Could you test attached patch?

by Carl Eugen Hoyos, 11 years ago

Attachment: patchopencv.diff added

in reply to:  2 comment:3 by greybones, 11 years ago

Replying to cehoyos:

Could you test attached patch?

Ok! your patched worked!, compiled ok...
haven't done any other testing though..


comment:4 by Stefano Sabatini, 11 years ago

Patch looks OK, but we should possibly do a check on the libopencv version in configure, and require a version which supports the new interface (I don't know when cxcore.h replaced cxtypes.h).

comment:5 by greybones, 11 years ago

Ok last opencv revision to support cxtypes.h was 3059.. its gone in 3060

Versions prior to 2.1.0 I think..

perhaps your more skilled at browsing their svn than I am...

comment:6 by Stefano Sabatini, 11 years ago

Analyzed by developer: set
Reproduced by developer: set
Resolution: fixed
Status: openclosed

Should be fixed in commit:

commit f1b3f33d48b366dd7b3b915b4de90d9ad4c4ae39
Author: Stefano Sabatini <>
Date: Fri May 20 11:36:16 2011 +0200

vf_libopencv: prefer opencv/cxcore.h over cxtypes.h

Require the presence of opencv/cxcore.h in place of opencv/cxtypes.h,
which has been removed. Fix compilation with libopencv > 2.1.0.

Fix trac issue #221.

Note: See TracTickets for help on using tickets.