#出现这个问题是因为ffmpeg的库编译时没有添加fPIC
#解决办法:重新编译ffmpeg库
git下载:
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
解压进入下载目录
使用如下命令编译生成make:
sudo ./configure --enable-nonfree --enable-pic --enable-shared
sudo make
sudo make install
重新编译遇到问题的库即可
二:
Openvslam的编译问题recompile with -fPIC:
在yaml-cpp的cmake选项上加上 -DYAML_BUILD_SHARED_LIBS=ON
重新编译yaml-cpp:
git clone https://github.com/jbeder/yaml-cpp
cd yaml-cpp
mkdir build && cd build
cmake \
-DYAML_BUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
..
make -j2
sudo make install