OpenCV编译错误

OpenCV编译错误

我正在 Ubuntu 平台上安装 OpenCV 2.4.11。它已经构建好了。但在编译时显示错误:

  Linking CXX shared library ../../lib/libopencv_core.so
  /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libm.so when searching for -lm
  /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libm.a(s_sin.o): relocation R_X86_64_32S against `__sincostab' can not be used when making a shared object; recompile with -fPIC
  /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libm.a: error adding symbols: Bad value
  collect2: error: ld returned 1 exit status
  make[2]: *** [lib/libopencv_core.so.2.4.11] Error 1
  make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
  make: *** [all] Error 2

有什么想法吗?我opencv之前有过,我卸载了它。现在我正在安装,所以它给了我这个错误。

相关内容