C ++ compilers have many advantages. It is impossible for everyone to use it all.
I want to count what the current mainstream compilers have. What compilers are most popular in Linux, windows, and DoS! Please give your comments and provide the advantages of the compiler you are using.
---------------------------------------------------------------
I am mainly engaged in programming in windows, so I usually use VC to compile. After all, it is a product that is the dominant software in today's world. I naturally don't have to ask about its performance and functions. That is, the Compilation speed is a little slow. So when I write a small program, I have an LCS compiler. The performance is good, and the compilation speed is extremely fast.
In addition, I think VC may not be a good compiler for beginners, because MFC encapsulates all program execution mechanisms in its class. The code may be unknown for beginners. But it is good for beginners. It is a standard SDK compiler. The program running mechanism and message processing mechanism are clearly written.
Let's see each other!
My options:
Windows preferred VC for beginners, small projects
I mainly use these two compilers. Others are rarely used, so I dare not evaluate them. Please comment.
---------------------------------------------------------------
I have dozens of C/C ++ compilers.
As follows:
The GCC family has
Cygwin
Mingw32
Djgpp
Dev-C ++ (mingw32)
There are also authentic GNU gcc 2.95.5 ~ 3.0.0.4
Ms family has
MSC 5.0, 6.0, 7.0
Msqc 1.0, 2.5
Msvc 1.0, 4.2, 6.0, 7.0
Borland has
TC 1.0, 2.0
TC ++ 1.01, 3.0
BC 3.0, 3.1, 4.0, 4.5, 5.0, 5.02
BCB 3.0, 5.0, 6.0
Others include
Intel C/C + + 5.0
Watcom C/C ++ 11.0, 11.0c
Vectorc 1.3.3
IBM visualage for C ++
Digitalmars C/C ++
Kai C/C ++ 4.03f for Redhat 7.2
Lcc4.1
LCC-WIN32 2001-09-25 ~
Small C
Cc386
Pacific c
In addition, there is a C interpreter.
Quincy
EIC
CINT
I have used most of the compilers/interpreters mentioned above. The five compilers vc7.0 cygwin mingw32 vectorc and LCC-WIN32 are now fixed.
In the GCC family, GNU gcc is fundamental, and other compiler versions are exported from it. Among them, cygwin and mingw32 are both compilers on the Win32 platform, while djgpp is a 32-bit compiler under DOS. The well-known DEV-C ++ is at best a shell of GCC, and its built-in compiler is a version of mingw32. Among these GCC versions, cygwin is the largest. It is not so much a compiler as a programming tool. It not only has compilers, but also has many other tools. In fact, it is the implementation of a UNIX System on the Win32 platform. Most commonly used UNIX tools are implemented. In recent versions, "Tools" such as Apache are integrated. However, although cygwin is powerful, it is not very easy to use (similar to Unix, it can be used quickly by people familiar with Unix), because too many other tools distract people's attention. Compared with mingw32, mingw32 is much easier to use. It has only a few basic programming tools (unfortunately it does not have GDB ). GCC is not only a C/C ++ compiler, but also many other compilers such as Java, Fortran, and Ada. It is a set of compilers, but some compilers can only be used on UNIX systems. The compiler of the MS family is not required. Everyone is familiar with them. VC 7.0 (VC. net) is its latest product. Needless to say, the Borland family is also familiar to everyone. Recently, it launched BCB 6.0.
Other compilers, such as Intel C/C ++, are known to be intel at first glance. It is fully compatible with vc6, but can only be used when it is attached to vc6. Watcom C/C ++ was a member of the four-nation compiler war earlier. It was a good thing. Unfortunately, the strategy is wrong, and now it's gone. An openwatcom based on it is still fighting. Vectorc is a good stuff that I recently discovered. It is a pure C compiler. IBM's visualage for C ++ was originally something IBM wanted to use for the c ++ compiler, but IBM's strategy was changed and it was abandoned. Symantec C ++, the predecessor of digitalmars C/C ++, is also a member of the four-nation compiler war, so the author changed it to digitalmars C/C ++ for use. All of the above are on the Win32 platform. Kai C/C ++ is a powerful C/C ++ compiler with multiple platforms. However, it has been acquired by Intel and has stopped development. Lcc4.1 is a pure C compiler. It is open source code. But it is not easy to use. LCC-WIN32 is a C language on the basis of the development of the C language integrated development environment, very easy to use, and there are very detailed information, free! Pacific c is an integrated development environment for pure dos C. Small C cc386 is an open-source compiler, which is very simple and used to learn compiler. Quincy eic cint is a C interpreter. It is used to help you learn about C language. CINT is powerful and supports some C ++ features.
Of course there are many other compilers. The compilers I provide here can be used on Win32 or DoS platforms (except for Kai ). The compilers on UNIX platforms are mainly GNU, and I am not very clear about the others.
Among the above compilers, the most special thing is that vectorc only supports pure C. However, it is called the fastest compiler, but after my experiments, it is indeed more powerful than other compilers in some cases! It also has an interactive optimizer that allows you to directly view the assembly code mapped to the C code. Cygwin and mingw32 are born to a mother, and their running effect is not much different. The code they generate is very efficient and the compilation speed is very fast. The most important thing to note is that their support for C ++ features is the most complete of all compilers, they also support most of the c99 features. This is very good! You are familiar with Ms VC. However, it has made great improvements in its latest product vc7.0. Its support for C ++ features is greatly improved than 6.0, which is second only to GCC in the compiler I use. And the program compiled by it runs fast! There are only a few cases where javasvectorc and GCC are the fastest! The average running speed is the fastest. I don't need to talk about Borland products. Both tc2.0 and bc3.1 are my favorite things. However, BCB is not as slow as vc6! IDE also has many bugs. The most puzzling thing is that the Code it generates runs slowly, slower than the LCC-WIN32! The only thing that is worth mentioning is that rad does better than Ms. Intel compilers may be unfamiliar. It's too expensive! It is not cost-effective to support VC, and the compilation speed is slower than that of vc6. However, its code quality is very good. Digitalmars C/C ++ has no highlights. It has a fast Compilation speed, moderate code execution speed, and good support for the c ++ feature. LCC-WIN32 is a very good integrated development environment, it only supports pure C. It Compilation speed is extremely fast! The code execution speed is slow. But its biggest highlight is its IDE. Among all the free programming tools, its IDE is the most professional and has powerful code analysis and management functions. It also provides a lot of programming materials.
I have tested the code execution efficiency of Some compilers. The following is an overview:
1. vectorc, VC 7.0 (extremely fast)
2. Intel C/C ++, VC 6.0, and GCC (FAST)
3. digitalmars C/C ++ (General)
4. LCC-WIN32, BCB, bc5.02 (slow)
Of course, my tests are one-sided. However, the general situation has been largely reflected.
(I have also seen a test, where Intel compiler is the fastest, 6.0 faster than VC 10% and GCC ~ 50%, while GCC> = vc6> intel C/C ++)