Linux (6) OpenCV (4) MATLAB (3) Mac OS X (3) Windows (2) C# (1) Node JS (1)

2013年5月23日 星期四

Solve the "recompile with -fPIC" error when compiling OpenCV with FFMPEG

The error happens while one wants to compile OpenCV with FFMPEG on 64 bits linux. Adding the parameter "--enable-pic" is not enough. Both the --enable-shared and --enable-pic need to be included when configuring ffmpeg:

./configure --enable-shared --enable-pic

For more details, please refer to :

A Comprehensive Guide to Installing and Configuring OpenCV 2.4.2 on Ubuntu

I have successfully compiled on Fedora 64 bits. Good luck.

Create links to old OpenCV libraries

Thanks to Michael C. Hughes, which posted a method to create symbolic links of old OpenCV libraries. Here is the original blog:

Here is the way to link OpenCV old library (< 2.0) to latest versions :

  •   --->
  •         --->
  •  --->
  •        --->
  •    --->
via the commands:

cd </PATH/TO/OPENCV/lib>
ln -s

ln -s
ln -s
ln -s
ln -s