我努力使MVTec Halcon 11在Ubuntu上运行。 一切都在正确的地方,但程序没有看到图像采集所需的dynamic库(相机单独工作正常,驱动程序安装)
我添加了库的path到/etc/ld.so.conf
,运行了ldconfig -v
但是目录中存在的28个文件(全部为“Shared Library”types和.so扩展名),只有“lib * .so “有联系。 事实上,ldconfig输出中的所有库都称为lib *。
奇怪的是,如果我在文件的名称前面添加“lib”,它们就会被链接(当然,这对软件来说是不可能的)
这是为什么?
来自ld.so和ld-linux.so的人
部分文件:
lib * .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使用这个来确定文件是否可以是共享库。