Home > Back-end >  So when will the dynamic library embedded in their own name???????
So when will the dynamic library embedded in their own name???????

Time:10-22

Find yourself using GCC compiler dynamic library to change a name can also use but changed name written in CMake compilation can cross but perform tip can't find it when I was using the LDD view or want to look before the name of the later found CMake generated so it is with his own name, please everyone a great god what is this? What is the parameter of the library name also write to the repository?

CodePudding user response:

He had found, the record
Is the GCC - Wl - soname directive specifies the name of the library (the name embedded in the library file), so mainly in order to upgrade the version management, detail can baidu
Also Cmake is generally through the export LDFLAGS="- Wl - O1 - Wl - hash - style=gnu - Wl, build - id=sha1 - Wl, - as - men" this way to specify the parameters passed to the linker

CodePudding user response:

Is there such a thing? Feeling so in LIBRARY_PATH (compile time) or LD_LIBRARY_PATH (runtime) path should be no problem

CodePudding user response:

refer to the second floor qybao response:
is there such a thing? Feeling so in LIBRARY_PATH (compile time) or LD_LIBRARY_PATH (runtime) path should be no problem.

Compile executable file no problem, when the runtime tip can't find the library should be compiled executable file is not according to the dynamic libraries under the name of LIBRARY_PATH LD_LIBRARY_PATH name below but decided according to the names of the repository is embedded with the readelf - d dynamic library name can view is embedded in the name of dynamic link library (SONAME field)
  • Related