-LM refers to the connection libm.so meaning is the connection Mathematics library,-lnsl if involves the RPC programming, necessarily needs libnsl.so, therefore must add-lnsl in the compilation option. The GCC compilation option-L is the path to the online library-L is the LDL that you want to connect to indicates that the connector connects to a library. This library contains functions such as Dlopen, Dlsym, and so on. That is, a library that supports the "Show load using dynamic Connection Library" at run time. The associated header file is Dlfcn.h
This library is not helpful if you are ready to statically connect OpenSSL in. It's not going to be. This library is for the runtime, to display (through explicit code), load the dynamic library.
looking at your question, should you use a dynamic library to compile your modules? -L is a connector option,-LNSL is to say that in your program to use the NSL library, generally such as-LAABBCC statements, you can find the search path has a libaabbcc.a file
a simple understanding is, what is behind the-l, is the link to what library
and
-lpthread and-llibc++,
Libstdc++.so is also available, but when you use g++ to encode C + + code, you will be self-link to this library, such as the use of GCC to encode the C code when the self-link libc.so.
but I use the math library is math.h Ah, why only write-lm know is a math library? Shorthand?
The math library is in libm.so, and the link is just to write-lm.
and what's that ' liblibrary.a ' on top?
In-llibrary, the library is the name of the repository (this is an example), and the repository file is the liblibrary.so (or liblibrary.a). -l Specifies the library you want use
M for libm.so
ABC for LIBABC.SO/LIBABC.A linux on the ln command details that LN is another very important command in Linux, its function is to create a file in another location with a link, the most commonly used parameter is-s, the use is: ln–s The source file destination file.
When we need to use the same file in different directories, we do not need to put a file in each required directory, we just put the file in a fixed directory, and then in the other directory with the ln command link it can, do not have to repeatedly occupy disk space. Example: ln–s/bin/less/usr/local/bin/less
-S is the meaning of the Code name (symbolic).
Here are two points to note: first, the LN command will maintain the synchronization of each linked file, that is, no matter where you change, the other files will change the same; second, ln links and soft links and hard links two, soft link is ln–s * *, It will only generate a mirror image of the file in the location you selected, not disk space, hard link ln * *, no parameter-s, it will generate a file in your chosen location with the same size as the source file, whether it is a soft link or a hard link, the file will remain in sync.
If you use LS to look at a directory, found that there is a file at the end of a @ symbol, that is, a file generated with the LN command, with the ls–l command to see the link shown in the path.
Instruction detailed description
Directive Name: LN
Usage rights: All users
How to use: ln [options] Source dist, where option is in the format:
[-BDFINSVF] [-S Backup-suffix] [-v {numbered,existing,simple}]
[--help] [--version] [--]
Note: In the Linux/unix file system, there is a so-called link, we can consider it as the alias of the file, and the link can be divided into two types: Hard link and soft link (symbolic link), hard link means that a file can have multiple names, The soft-link approach is to produce a special file with the content of the file pointing to the location of another file. Hard links exist in the same file system, while soft links can span different file systems.
LN Source Dist is the generation of a link (dist) to the source, and the use of a hard or soft link is determined by the parameter.
Whether a hard link or a soft link will not copy the original file, it will only occupy a very small amount of disk space.
-F: Delete the file with the Dist file name at the end of the link
-D: Allow system managers to hard-link their own directories
-I: Ask before deleting the file with the Dist file name
-N: When making a soft link, treat the dist as a generic file
-S: Soft junction (symbolic Link)
-V: Displays the file name before the link
-B: Files that are overwritten or deleted at the time of the link are backed up
-S SUFFIX: Add the backed up files with SUFFIX tails
-V Method: Specify how the backup should be
--HELP: Show Auxiliary Instructions
--version: Display version
Example:
The file yy produces a symbolic link:zz
Ln-s yy ZZ
To create a hard link:zz file yy
ln yy XX
_sys_lib= "-LM-LNSL-LDL"