Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use the gcc command of linux to GUN Cramble + compiler

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail about the use of linux's gcc command GUN Cripple + compiler. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The gcc command uses the GNU-based compiler based on CAccord, which is the most widely used compiler in the open source field. It has the characteristics of powerful function, and the compiled code supports performance optimization.

At present, many programmers use gcc. At present, gcc can be used to compile programs in languages such as Cmax Candle +, FORTRAN, JAVA, OBJC, ADA and so on. You can choose the supported language according to your needs.

Syntax format: gcc [parameters] [source file]

Common parameters:

-o specifies that the generated output file-E only performs compilation preprocessing-S converts C code to assembly code-wall displays warning messages-c only performs compilation operations, not concatenation operations

Reference example

No option to compile the file:

[root@linuxcool ~] # gcc linuxcool.c

Preprocess, assemble, compile, and link the linuxcool.c to form an executable file linuxcool:

[root@linuxcool] # gcc linuxcool.c-o linuxcool

Output the linuxcool.i file from linuxcool.c preprocessing:

[root@linuxcool] # gcc-E linuxcool.c-o linuxcool.i

Compile linuxcool.c and linuxcool_1.c separately and link them to linuxcool_2 executable files:

[root@linuxcool] # gcc linuxcool.c linuxcool_1.c-o linuxcool_2

Output the linuxcool.i file from linuxcool.c preprocessing:

[root@linuxcool ~] # gcc-E linuxcool.c-o linuxcool.i about the use of linux's gcc command GUN Cannabash + compiler is here. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report