What is a library A library file is a collection of precompiled functions that are written according to the principles of reusability. They are usually composed of a set of interrelated functions that perform a common job. In essence, a library is a binary form of executable code that can be loaded into memory by the operating system. There are a large number of libraries on both the Windows platform and the Linux platform, but because of the nature of Windows and Linux, the binary of the libraries is incompatible. Classification of Libraries There are two types of libraries under Windows: static libraries (.lib) and dynamic link libraries (.dll). There are two kinds of libraries under Linux: static libraries (.a) and shared libraries (.so). The name of the static library under Linux is generally libxxxx.a, where xxxx is the name of the lib. The name of the dynamic library under Linux is generally libxxxx.so.major.minor, xxxx is the name of the lib, and major is the major version number. Minor is the minor version number. The similarities and differences between libraries under Windows and libraries under Linux Linux shared libraries (.so) are like Windows dynamic link libraries (.dll), which contain many functions commonly used by programs. In order to facilitate program development and reduce program redundancy, the program does not need to include a copy of each commonly used function, just call the constant function in the shared library when needed. This way we call it Dynamically Linked. And sometimes we don't want to call the program to call the function of the shared library, but to link the library function code directly into the program code, that is, the program itself has a copy of the function in the shared library. This way we call it Static Linked. So, the simple difference between static libraries and shared libraries (dynamic libraries) is that the code is loaded at different times. The code of the static library has been loaded into the executable during the compilation process, so it is bulky. The code of the shared library is loaded into the memory when the executable is running. It is only a simple reference during compilation, so the code is small. The difference between the dynamic link library (.dll) under Windows and the shared library (.so) under Linux. The dll file is actually and. Like the exe file, it belongs to the executable file in PE format. For implicit reference to external symbols, the location of the external symbol needs to be written on the PE header. The PE loader will find the dependent symbol table from the PE header and load the rest of the dependencies. Dll file. This is not the case on Linux! . The so files are mostly elf executable file formats. When they need external symbols, you can not specify where these symbols are located. That is, usually. The so file itself does not know which symbols it depends on. So inside. These symbols are provided by the process that calls dlopen when it runs. We do one under Windows. You also need to carry one when you have a dll file. Lib file; in Linux, generally only need to have the corresponding header file is enough. For writing new ones. So, the symbol that can't be found can be left there until the file is finally executed to join all the required symbols together. Windows can exist one. Dl to another. The implicit dependency of dll; generally does not need to be allowed under Linux. So and. So has implicit dependencies.
The original use of Tomcat in Linux does not use the newly created user created by the non-ROOT perm
Computer store news: Do you remember that Steam is ready to host? Now there is new news: this hardwa
U disk operating method under Linux and operating methods under windows system are still somewhat d
This article introduces the concept, role, and usage of LVM to help you understand LVM and to use LV
Select function implementation principle analysis
VPS disk full full led to ngnix can not start
Linux vi save exit command (how to exit vi)
19 thoughts clearly understand the load balancing under Linux
Fedora install virtualbox kernel error
Centos system to see if cpu supports 64-bit examples
Enhanced Security Devil Linux 1.6.1 Release
Back up files and directories and transfer backup files to windows scripts
Tizen 1.0 released Linux-based mobile operating system
Configuration Notes on Strengthening Linux Operating System Security
Modify the registry to shorten the response time of Win 7 programs
How to solve Linux Chinese garbled?
Teach you three ways to easily uninstall Win 7 SP1 Beta
Win8.1 connection wifi limited how to do Win8.1 wireless network limited solution
If you forget the Windows XP system password, find the method
Explain the specific steps to use the most recent correct configuration
Wonderful regret medicine XP restore tool
Quickly locate the location of the Win8 calculator
Linux system (Debian and Ubuntu) completely remove wine
Input method can not switch to solve the input method can not switch method