ldconfig only links files starting with lib*?

后端 未结 1 1517
再見小時候
再見小時候 2021-01-14 02:25

I\'m struggling to make MVTec Halcon 11 work on Ubuntu. Everything is in the right place but the program doesn\'t see the dynamic libraries needed for image acquisition (the

1条回答
  •  抹茶落季
    2021-01-14 03:08

    From the man of ld.so and ld-linux.so

    Section FILES :

    lib*.so* shared libraries

    And from 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;
    

    Looks like you must choose a name begining with lib... The libc uses this to determine if the file may be a shared library.

    0 讨论(0)
提交回复
热议问题