Ask Your Question

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


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

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


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

Seen: 785 times

Last updated: Nov 06 '12