[FFmpeg-user] Msys2-Mingw64 OpenCV Build Error

Max Ashton max at halfapixel.net
Tue Sep 12 15:52:57 EEST 2017


Hi guys,

I'm using MSys2 with Mingw64 to compile FFMpeg 3.3.3 with opencv enabled.  I have installed opencv version 3.2.0-7 using pacman -S mingw-w64-x86_64-opencv but get the following error when I try to ./configure --enable-libopencv

gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c11 -fomit-frame-pointer -mms-bitfields -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/fribidi -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include -mms-bitfields -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -c -o /tmp/ffconf.INsGNY2h/test.o /tmp/ffconf.INsGNY2h/test.c
C:/msys64/tmp/ffconf.INsGNY2h/test.c: In function 'check_cvCreateImageHeader':
C:/msys64/tmp/ffconf.INsGNY2h/test.c:3:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
long check_cvCreateImageHeader(void) { return (long) cvCreateImageHeader; }
                                               ^
gcc -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--image-base,0x140000000 -o /tmp/ffconf.INsGNY2h/test.exe /tmp/ffconf.INsGNY2h/test.o -lopencv_core -lopencv_imgproc -lmp3lame -LC:/msys64/mingw64/lib -lfreetype -LC:/msys64/mingw64/lib -lfdk-aac -LC:/msys64/mingw64/lib -lass -lm -llzma -lbz2 -lz -lpsapi -ladvapi32 -lshell32 -lole32
C:/msys64/tmp/ffconf.INsGNY2h/test.o:test.c:(.text+0x5fc): undefined reference to `cvRound'
C:/msys64/tmp/ffconf.INsGNY2h/test.o:test.c:(.text+0x5fc): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `cvRound'
C:/msys64/tmp/ffconf.INsGNY2h/test.o:test.c:(.text+0x60f): undefined reference to `cvRound'
C:/msys64/tmp/ffconf.INsGNY2h/test.o:test.c:(.text+0x60f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `cvRound'
C:/msys64/tmp/ffconf.INsGNY2h/test.o:test.c:(.text+0xfa9): undefined reference to `cvRound'
C:/msys64/tmp/ffconf.INsGNY2h/test.o:test.c:(.text+0xfa9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `cvRound'


Looking though the opencv 3.2 documentation it appears that cvRound has been dropped? As I find it in the 2.4 documentation but not the 3.2.

Does anyone have any suggestions on how I might fix this issue, without the need to fall back to opencv 2.4.

Thanks in advanced,

Kind Regards
Max


More information about the ffmpeg-user mailing list