. A files are static link library files. A static link is a link to a function or procedure to be called into an executable file, as part of an executable file. When multiple programs call the same function, multiple copies of the function are present in memory, wasting valuable memory resources. A file is a combination of multiple. o files.
The. So file is a shared library file (dynamic link). The function code called by the dynamic link is not copied to the application's executable file, but is simply added to the description of the called function (which is often the relocation information). The link relationship between the application and the corresponding. So is established only when the application is loaded into memory and starts running under the management of the operating system.
The. o file is an object file that contains the instructions that are executed by the 01 machine, and links are required when the program executes. The link is to chain multiple. o files into an executable file.
. Texi
.def module definition file She is a text file. It is used to export a DLL's function, __declspec (dllexport) is similar, but the. def file is not defined by Microsoft. There are only two required parts in a. def file: LIBRARY and exports. Let's first look at a basic. def file that I'll parse later.
LIBRARY dll_tutorial
DESCRIPTION "Our simple DLL"
exports
Add @1
Function @2
The first line, ' LIBRARY ' is a required part. It tells the linker (linker) How to name your DLL. The section below that is identified as ' DESCRIPTION ' is not required, but I like to put it in. The statement writes a string to the. Rdata section [according to MSDN], it tells people who might use this DLL, what this DLL does or what it is for (presence). The following section identifies the "exports" as another required part; This section allows the function to be accessed by other applications and it creates an import library. When you build this project, not only a. dll file is created, but an export library with a file extension of. Lib is also created. In addition to the previous section, there are four other parts identified as: NAME, Stacksize,sections, and VERSION. In. def a semicolon (;) start an annotation