GCC common compilation options for embedded Linux tools

GCC (GNU Compiler Collection, GNU Compiler Suite) is a programming language compiler developed by GNU. It is free software released under the GPL license. Originally the official compiler for the GNU operating system, GCC has been adopted as the standard compiler by most Unix-like operating systems (such as Linux, BSD, Mac OS X, etc.), and GCC is also applicable to Microsoft Windows. GCC is a well-known example of the development of free software processes, published by the Free Software Foundation under the GPL.

1. GCC common compilation options

The first 5 are very common, the option '-V' has not been used, '-I dir' is used when writing Makefile.

The "-I dir" option adds a dir directory to the list of search paths in the header file. Since the header files in Linux are placed in the "/usr/include/" directory by default, when the user wants to add a header file placed in another location, it can be specified by the "-I dir" option, so that gcc is Will find the corresponding directory to the corresponding location.

For example: for example, there is a text.c, text.h file in the "/home/share/lesson1" directory, text.h is custom and #include in text.c This is included. (If it is #include"text.h", you don't need to add '-I'." "It means looking in this directory."

Correct command: gcc text.c -I /home/share/lesson1/ -o text This will perform the correct result

2. Library options

There are a lot of dynamic compilations and static compilations on the Internet. Personally, I don’t feel that I use them a lot. I have an impression when I have done it myself.

Semi-Automatic Washing Machine Spin Motor

Semi-Automatic Washing Machine Spin Motor,Motor For Wash Machine,Al Wire Spin Motor,Semi Automatic Washing Machine Dryer Motor

WUJIANG JINLONG ELECTRIC APPLIANCE CO., LTD , https://www.jinlongmotor.com