-O: Specify the target file name
-STD = c99 is compiled using the c99 Standard
-Wall warning Enabled
-C: Only compilation without link, generating intermediate files
-G generate debugging information
-O0: it is not optimized by default (if debugging information is to be generated, it is better not optimized)
-O1: simple optimization without the trade-off between speed and space;
-O2: further optimization, including scheduling. (This option is the most suitable for optimization. It is the default optimization level for GNU release software;
-O3: chicken ribs, probably making the program slower;
-Funroll-loops: Expand the loop to increase the number of executable files. Whether the speed increases depends on the specific environment;
-OS: generates the minimum execution file;
-LLibnameLink to a specified library
Note that GCC requires the database sequence of parameters during the database connection process. The database on the right of the parameter is loaded before the database on the left.
If you want to link the pthread library, the compilation command may be like this: gcc-STD = gnu99-wall-O Server *. C-lpthread
But it cannot be like this: gcc-STD = gnu99-wall-lpthrad-O Server *. C #-lpthread must be placed behind.