Home  >  Article  >  Operation and Maintenance  >  What compiler do you use for linux?

What compiler do you use for linux?

青灯夜游
青灯夜游Original
2021-11-22 16:50:407246browse

The compilers available for Linux are: vim, Emace, Brackets, LightTable, gedit, Sublime Text 3, GCC, Clang, Visual Studio, Eclipse, EGCS, PGCC, etc.

What compiler do you use for linux?

#The operating environment of this tutorial: CentOS 6 system, Dell G3 computer.

Editors under Linux

1. vim

Vim is a text editor developed from vi. It has convenient programming functions such as code completion, compilation and error jumping, and is widely used among programmers. Tied with Emacs, it has become the favorite editor for Lunix system users – commonly known as the artifact.

2. Emace

Emacs, a famous integrated development environment and text editor. Emacs is recognized as one of the most popular code editors for professional programmers, the other being Vim.

Features: Emacs is not just an editor, it is an integrated environment, or it can be called an integrated development environment. These functions allow users to be in a full-featured operating system, based on the editor. Based on the functions of Emacs, it has developed a "bourne-shell-like" shell: EShell.

Emacs can also:

Send and receive emails

Edit remote files through FTP/TRAMP

Log in to the host through Telnet

上newsgroup

Log in to IRC and communicate with friends

View the calendar

Write an article outline

Editing on multiple programming languages

Debug the program, combined with GDB, EDebug, etc. Support C/C, Perl, Python, Lisp, etc.

Play games

Calculator

Keep a diary

Manage schedule, Task, ToDo, appointments Wait

Personal information management

Directory management

File comparison

Read info and man documents

Browse website

Provide a unified operating interface for various programs (TeX, etc.)

3. Brackets

Brackets is also an open source code designed for Linux developers Editor, use Brackets to write code and you won't be interrupted by anything. For example, when writing HTML code, you can preview the effect of your Web page in real time even if you do not save the code. You can also use Theseus to check variables. Brackets provides one theme by default. Of course, you can also get more themes in the extension center. Brackets is a web front-end editor developed based on web (html css js). It has many functions that are difficult to achieve with ordinary editors and is an artifact for web front-end developers.

4. LightTable

LightTable is a free and open source editor that has a very clean interface and has a large number of extensions. It is compatible with Windows, Mac and Linux and is highly customizable. Using Light Table, developers only need to open a browser window to view changes in real time, and different embeddings are supported.

5, gedit

Needless to say, gedit is an editor that comes with every Linux distribution by default, similar to Windows Notepad, but it can be colored according to the code type. , which is much more powerful than Notepad, but I have never found out how to configure gedit so that it can display line numbers and change tabs to 4 spaces, so I don’t use gedit to edit official files unless I have to.

6. Sublime Text 3

is a Linux code editor that is definitely worth mentioning because of its simple and cool features. The most unique thing about Sublime Text 3 is that it has no unique functions. It is just a simple code editor. With it, you can modify multiple lines of code very conveniently. With Sublime Text 3 you can manipulate files, rename variables, separate edits and other interesting operations.

7, GCC

GCC was originally a C language compiler launched by GNU, used for programming under Unix-like systems, so it is called GNU C Compiler. With the participation of many free developers, GCC has developed rapidly and now has become a compiler that supports many languages, including C, C, Ada, Object C and Java, etc., so that GCC began to be expanded into the GNU Compiler Collection. That means "GNU Compiler Collection".

GCC is usually used to compile C programs and C programs. gcc is generally used to compile C programs, and g is used to compile C programs. Since C is compatible with the C language, g can also compile C programs. We know that the Linux system does not use suffix names to distinguish file types, but gcc or g needs to distinguish the type of program files based on the suffix name. If the suffix name does not comply with the specification, it will prompt that the file type cannot be recognized, which gcc or g follows. Some of the suffix name naming conventions are shown in the following table.

后缀:表示的文件类型
.c:C 语言源代码文件;
.a:静态库文件;
.cpp/.cxx/.cc/.C:C++ 源代码文件;
.h:头文件;
.i:预处理过的 C 源代码文件;
.ii:预处理过的 C++ 源代码文件;
.m:Objective-C 源代码文件;
.o:编译后的目标文件;
.s:汇编语言源代码文件;
.S:还需要预编译的汇编语言源代码文件。

8、Clang

Clang is a compiler front-end for the C, C++, Objective-C, and Objective-C programming languages. The source code is released under the BSD license. Clang will support its normal lambda expressions, simplified handling of return types, and better handling of the constexpr keyword.
It uses the underlying virtual machine (LLVM) as its backend, and its goal is to provide a GCC alternative. Mainly written in C.
The Clang project includes Clang front-end and Clang static analyzer, etc. The performance is excellent, and the memory consumed by the Abstract Syntax Tree (AST) it generates is only about 20% of that of GCC. It has fast compilation speed, small memory footprint and easy IDE integration.
In the early days, different software was used to process each stage of programming. For example, word processing software was first used to edit the source program, then a linker was used to connect functions and modules, and then a compiler was used to compile. Developers must Switch operations back and forth between several software. Today's programming and development software integrates editing, compilation, debugging and other functions into a desktop environment, which greatly facilitates users. Next, we will introduce some integrated development environments:

9. Visual Studio

Microsoft Visual Studio (VS for short) is a series of development tool kit products from Microsoft Corporation of the United States. VS is a basically complete development toolset, which includes most of the tools needed in the entire software life cycle, such as UML tools, code control tools, integrated development environments (IDEs), etc. The object code written is applicable to all platforms supported by Microsoft, including Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight and Windows Phone.

Visual Studio is currently the most popular integrated development environment for Windows platform applications. It supports C-like languages, Basic-like languages, Java-like languages ​​and other languages. Because of its powerful functions, it occupies a large user share.

10. Eclipse

Eclipse is an open source, Java-based extensible development platform. By itself, it is just a framework and a set of services for building development environments through plug-in components. Fortunately, Eclipse comes with a standard set of plug-ins, including the Java Development Kit (JDK), a well-known cross-platform free integrated development environment (IDE).

Initially it was mainly used for Java language development. By installing different plug-ins, Eclipse can support different computer languages, such as C and Python and other development tools. Eclipse itself is just a framework platform, but the support of many plug-ins gives Eclipse flexibility that is difficult to achieve with other IDE software with relatively fixed functions. Many software developers develop their own IDEs using Eclipse as the framework.

11. EGCS

EGCS (Experimental/Enhanced GNU Compiler System) is the development direction of gcc. It integrates compilers such as fortran and its structure is very clear. , integrate various improvements/ports to gcc. For example, the gcc 2.7 series is said to have not been optimized for Pentium, while egcs has integrated some of the optimizations of pgcc for Pentium.

12, PGCC

PGCC (Pentium GCC) Compiler pgcc is a compiler optimized for Pentium CPU. It is said that the JPEG compression and decompression test can be 30 times faster than gcc %!The new version of pgcc is based on egcs and is released in the form of a patch.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What compiler do you use for linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn