我正在努力让 MVTec Halcon 11 在 Ubuntu 上运行。一切都在正确的位置,但程序看不到图像采集所需的动态库(相机单独工作正常,驱动程序已安装)
我将库的路径添加到/etc/ld.so.conf
然后跑了ldconfig -v
但目录中存在的 28 个文件(所有“共享库”类型和 .so 扩展名)中,只有“lib*.so”文件被链接。事实上,ldconfig 输出中的所有库都称为 lib*something。
奇怪的是,如果我在文件名前面添加“lib”,它们就会被链接(当然,这对软件来说是不行的)
这是为什么?
来自 ld.so 和 ld-linux.so 的人
部分文件:
库*.so*
共享库
并来自 glibc (./elf/ldconfig.c) :
712 /* Does this file look like a shared library or is it a hwcap
713 subdirectory? The dynamic linker is also considered as
714 shared library. */
715 if (((strncmp (direntry->d_name, "lib", 3) != 0
716 && strncmp (direntry->d_name, "ld-", 3) != 0)
717 || strstr (direntry->d_name, ".so") == NULL)
718 && (
719 #ifdef _DIRENT_HAVE_D_TYPE
720 direntry->d_type == DT_REG ||
721 #endif
722 !is_hwcap_platform (direntry->d_name)))
723 continue;
看起来您必须选择一个以 lib 开头的名称... libc 使用它来确定该文件是否是共享库。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)