构建环境:
支持图书馆:
我能够在64位Ubuntu环境中生成64位.so。[使用GCC和OpenCV内置64位。]没有问题。
我希望,如果我想在64位环境中构建32位,我需要设置-m32标志,更重要的是指向或引用32位支持包(OpenCV)我在这里吗?
我完成的步骤:
从我的64位计算机的/ usr / local中删除了64位opencv库文件夹
然后,在我的64位计算机的/ usr / local中复制并粘贴32位的预构建opencv库
创建示例opencv代码并执行以下命令:
g++ -c -g -I/usr/local/include -I/usr/local/include/opencv -I/usr/local/include/opencv2 -m32 -o test.o opencvtest.cpp
g++ -shared -m32 -o test.so test.o -L/usr/local/lib /usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgcodecs.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_shape.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_superres.so /usr/local/lib/libopencv_ts.a /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videoio.so /usr/local/lib/libopencv_videostab.so
我对自己的步骤表示怀疑,不管我是否采取了正确的步骤。
我收到错误。如果有人尝试过,请提供答案。