Pregunta

I'm trying to compile opencv for mac 10.8.5 at 32 bit. It requires libavcodec, that is installed with ffmpeg. So I have compiled ffmpeg at 32 bit.

But not opencv is complaining to do not manage to link against /usr/local/lib/libavcodec.a .. and actually I don't have it but I have only /usr/local/lib/libavcodec.dylib file.

Any help?

ps:

I'm compiling ffmpeg in this way:

./configure --disable-static --enable-shared --disable-outdev=sdl --enable-runtime-cpudetect --enable-zlib --cc="clang -m32"
make
sudo make install

and opencv:

mkdir build; cd build
cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C_FLAGS=-m32 -D CMAKE_CXX_FLAGS=-m32 ..
make -j8

No hay solución correcta

Otros consejos

Referring to FFMPEG official guide the right commands should be:

./configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass \
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus \
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid

 make && sudo make install

Be sure you have also x264, because working with OpenCV may require additional codecs (especially for video processing).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top