在64位平台上构建32位OpenCV

时间:2023-01-26 12:26:56

I am trying to run a pre-compiled program on my Ubuntu 64 bit system:

我试图在我的Ubuntu 64位系统上运行预编译的程序:

$  ./segmentObjs 
./segmentObjs: error while loading shared libraries: 
  libopencv_core.so.2.3: wrong ELF class: ELFCLASS64

I suspect this means that the program is looking for a 32 bit version of the libopencv_corelibrary, but can only find a 64 bit version.

我怀疑这意味着程序正在寻找32位版本的libopencv_corelibrary,但只能找到64位版本。

Is it possible to install a 32 bit version of OpenCV alongside my current version, and get this binary to use that one instead of the present installation? The downloads section of OpenCV only seems to offer one choice, and when I attempted to build version 2.3 of OpenCV I couldn't find any options to build a 32 bit version in 'cmake-gui'.

是否可以在我当前版本的同时安装32位版本的OpenCV,并使用该二进制文件而不是当前安装? OpenCV的下载部分似乎只提供了一个选择,当我尝试构建OpenCV的2.3版时,我找不到任何选项来在'cmake-gui'中构建32位版本。

Is what I am trying to do impossible or am I just attempting it wrong?

我想做什么不可能或者我只是尝试错了?

1 个解决方案

#1


1  

It can be done but you have to install ia32-libs plus all the dependencies of opencv in 32bit.

它可以完成,但您必须安装ia32-libs以及32位的opencv的所有依赖项。

#1


1  

It can be done but you have to install ia32-libs plus all the dependencies of opencv in 32bit.

它可以完成,但您必须安装ia32-libs以及32位的opencv的所有依赖项。