When we compile the program with GCC, we often use "I" (uppercase I), "L" (capital L), "L" (lowercase l), and so on, and then make a record:
Cases:
Gcc-o Hello hello.c -i/home/hello/include -l/home/hello/lib -lworld
The above sentence means that when compiling the HELLO.C:
-i/home/hello/include, which means that the/home/hello/include directory will be the first directory to look for headers , in the following order:/home/hello/include–>/usr/ Include–>/usr/local/include is the directory that specifies priority lookup, find the default directory
-l/home/hello/lib, which means that the/home/hello/lib directory is the first directory to look for a library file , in the order of:/home/hello/lib–>/lib–>/usr/lib–> /usr/local/lib Ditto, also specifies the directory of priority lookup
-L Word, meaning * * Looking for dynamic link library file **libword.so (that is, the file name removed from the prefix and the suffix represented by the library file) if you add the compilation option-static, to find the static link library file, that is LIBWORD.A
For a third-party-provided dynamic-link library (. So), it is generally copied to a Lib directory (/usr/local/lib), or the directory with-L is specified, and then uses-l to specify its name