Ask Your Question
0

OpenCV 2.4.3 build on MacOS 10.6.8 fails

asked 2012-11-04 15:37:19 -0600

Chaos_99 gravatar image

Hi, I'm trying to build OpenCV on a Mac following the standard

mkdir build
cd build
cmake -G "Unix Makefiles" ..
make -j8
make install

Cmake runs fine, but reports only cocoa as found GUI (although QT is installed as well). Then make fails at

Linking CXX shared library ../../lib/libopencv_highgui.dylib
[ 46%] Built target opencv_photo
[ 47%] Built target opencv_video
Undefined symbols:
  "_av_get_channel_layout_string", referenced from:
      _avcodec_string in libavcodec.a(utils.o)
      _avcodec_get_channel_layout_string in libavcodec.a(audioconvert.o)

and a lot of other undefined symbols like

"_av_image_fill_pointers"
"_av_get_bits_per_sample_fmt"
"_av_image_copy_plane"
"_av_image_check_size"
"_av_parse_video_rate"

and so on. What am I doing wrong? Does anyone recognize those symbols? In which library should they be defined?

Thanks, Chaos

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-11-06 02:25:16 -0600

Emmanuel gravatar image
  1. To make sure that you use Qt, you have to pass the option in your cmake call. You can use ccmake to have a visual interface inside your term in rider to check all the settings.

  2. These symbols come from the ffmpeg libs. You can install them with e.g. homebrew (among all the methods I have tested to install them it's by far the easiest one). Note however that 2.4.3 introduced a regression for me at this point: highgui is asking at runtime for a specific version of the ffmpeg libs which is not the latest one provided by homebrew.

Hope this helps !

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-04 15:37:19 -0600

Seen: 781 times

Last updated: Nov 06 '12