gpt4 book ai didi

c++ - 与 libjpeg 的链接错误

转载 作者:太空宇宙 更新时间:2023-11-04 14:04:46 25 4
gpt4 key购买 nike

我正在编译我自己的链接到 libjpeg 的库。我在两台计算机上进行了编译,但这在一台计算机上不起作用他们中的。错误如下:错误的 JPEG 库版本:库是 62,调用者期望 80但是只安装了 libjpeg8:

/usr/lib/i386-linux-gnu/libjpeg.so.8
/usr/lib/i386-linux-gnu/libjpeg.so.8.0.2
/usr/lib/x86_64-linux-gnu/libjpeg.a
/usr/lib/x86_64-linux-gnu/libjpeg.so
/usr/lib/x86_64-linux-gnu/libjpeg.so.8
/usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
/usr/local/cuda-5.0/jre/lib/amd64/libjpeg.so

我的 cmake 链接到正确的 SO 文件:

-- Found libjpeg:
-- - Includes: /usr/include
-- - Libraries: /usr/lib/x86_64-linux-gnu/libjpeg.so

老实说,我不知道发生了什么......有任何想法吗 ?提前致谢!

有一些奇怪的东西。如果我不将我的程序链接到任何类型的 jpeg 库,我的代码会编译,我可以执行它,但我也会收到相同的消息错误。但是,如果我对我的可执行文件执行 ldd,则没有 libjpeg 的踪迹。这怎么可能?

linux-vdso.so.1 =>  (0x00007fff83bfe000)
libopencv_calib3d.so.2.4 => /usr/local/lib/libopencv_calib3d.so.2.4 (0x00007fa79670c000)
libopencv_contrib.so.2.4 => /usr/local/lib/libopencv_contrib.so.2.4 (0x00007fa796423000)
libopencv_core.so.2.4 => /usr/local/lib/libopencv_core.so.2.4 (0x00007fa795dca000)
libopencv_highgui.so.2.4 => /usr/local/lib/libopencv_highgui.so.2.4 (0x00007fa795999000)
libopencv_imgproc.so.2.4 => /usr/local/lib/libopencv_imgproc.so.2.4 (0x00007fa7954ed000)
libopencv_ml.so.2.4 => /usr/local/lib/libopencv_ml.so.2.4 (0x00007fa79526e000)
libvitals.so.0.2 => /home/jean/Lib/libvitals.so.0.2 (0x00007fa794f7b000)
librobbie.so.0.1 => /home/jean/Lib/librobbie.so.0.1 (0x00007fa794d32000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa794a11000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa79470c000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa7944f6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa79412d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa793f10000)
libopencv_flann.so.2.4 => /usr/local/lib/libopencv_flann.so.2.4 (0x00007fa793ca1000)
libopencv_features2d.so.2.4 => /usr/local/lib/libopencv_features2d.so.2.4 (0x00007fa7939f8000)
libopencv_video.so.2.4 => /usr/local/lib/libopencv_video.so.2.4 (0x00007fa7937a1000)
libopencv_objdetect.so.2.4 => /usr/local/lib/libopencv_objdetect.so.2.4 (0x00007fa793522000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa79330a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa793102000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fa792dd4000)
libcudart.so.5.0 => /usr/local/cuda/lib64/libcudart.so.5.0 (0x00007fa792b79000)
libnpp.so.5.0 => /usr/local/cuda/lib64/libnpp.so.5.0 (0x00007fa78d08c000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fa78ce66000)
libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007fa78c82c000)
libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007fa78c57a000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fa78c32b000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa78c02e000)
libgtkglext-x11-1.0.so.0 => /usr/lib/libgtkglext-x11-1.0.so.0 (0x00007fa78be2a000)
libgdkglext-x11-1.0.so.0 => /usr/lib/libgdkglext-x11-1.0.so.0 (0x00007fa78bbc6000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa78b9c1000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fa78b7bc000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fa78b596000)
libxml++-2.6.so.2 => /usr/lib/libxml++-2.6.so.2 (0x00007fa78b372000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fa78b00f000)
libglibmm-2.4.so.1 => /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 (0x00007fa78ada5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa7969ae000)
libnvidia-tls.so.319.23 => /usr/lib/tls/libnvidia-tls.so.319.23 (0x00007fa78aba1000)
libnvidia-glcore.so.319.23 => /usr/lib/libnvidia-glcore.so.319.23 (0x00007fa78864b000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa788310000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa7880fe000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fa787ef9000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fa787cec000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fa787ae6000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fa7878c3000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fa7875bf000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fa78739f000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fa787044000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fa786e30000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fa786be5000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fa7869aa000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fa7867a0000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fa78659d000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fa78638c000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fa786182000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fa785f77000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fa785d73000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fa785b70000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa785967000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa785728000)
libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007fa7854a9000)
libXmu.so.6 => /usr/lib/x86_64-linux-gnu/libXmu.so.6 (0x00007fa785290000)
libpangox-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangox-1.0.so.0 (0x00007fa785082000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fa784e60000)
libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007fa784c5a000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa784a3c000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fa78479e000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fa784507000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fa784304000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fa7840f9000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fa783eda000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fa783cbf000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fa783a28000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fa7837fe000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007fa783598000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa783393000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa78318d000)
libicule.so.48 => /usr/lib/x86_64-linux-gnu/libicule.so.48 (0x00007fa782f57000)
libicuuc.so.48 => /usr/lib/x86_64-linux-gnu/libicuuc.so.48 (0x00007fa782bec000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fa7829e4000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fa7827c7000)
libicudata.so.48 => /usr/lib/x86_64-linux-gnu/libicudata.so.48 (0x00007fa781457000)

最佳答案

有用的评论 Joe Z!记得昨晚在我的机器上安装了一个新软件“金山办公”,里面安装了一个嵌入式版本的libjpeg(62版本)。但我昨晚也卸载了它,我确保只有版本 8 仍然存在。但一定是搞砸了我的库。请注意,我还安装了很久以前使用 libjpeg 支持构建的 OpenCV。因此,考虑到您的意见,我只是在没有 libjpeg 支持的情况下重建了 OpenCV,现在一切正常。

关于c++ - 与 libjpeg 的链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17534668/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com