In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "C++ compilation Environment Analysis". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The source program is input to the interpreter, and the interpreter may convert the program to an appropriate internal form to achieve greater speed. The interpreter works more like human work. It processes strings and assigns meaning to them. Common interpreters are scripting languages such as PHP, Perl, ASP, bash, and so on.
Compiler
What is a compiler? Like the interpreter, the compiler is a way of running the program, but it is different from the interpreter. The interpreter is executed while the interpreter is interpreted, while the compiler is executed multiple times after compilation. Metaphorically speaking, we are like a fish, the interpreter will find a fish for you, but the compiler will give you a net and catch the fish yourself.
The source program is the input of the compiler. After analysis and processing, the compiler converts the source program into a binary program that can be executed directly. A binary program is a set of instructions and data that the machine can directly understand and execute. At this time, we just need to simply load the program into memory and give it the control of CPU.
Generally speaking, the interpreter is much slower than the compiler, because the interpretation needs to be done many times, but the compilation is only done at once, so it will save a lot of time. C++ and C languages are typical compilers. With the development of computer hardware, modern interpretive programs become more and more successful and powerful, and have formed a strong competition.
C++ compilation environment
C++ is a compiler, so which tool completes the conversion process from C++ source program to C++ binary program? This tool is the C++ compiler. As said above, the C++ compiler reads the source program and generates runnable binaries after analysis and processing.
C++ compiler and related tools constitute the C++ compilation environment. There may be other tools in the C++ compilation environment, such as preprocessor, editor, designer and so on. In fact, there are a lot of compilation environments, some of which are very advanced and some may focus on ease of use.
GNU Compiler Collection (GCC) is used to complete our work throughout this manual. GCC is a collection of compilers, not only the C++ compiler, but also other compilers or interpreters. It is free and open, and people all over the world should use it, so use it.
In addition to Gmail +, there are also intel C++ compiler, IBM C++ compiler and, of course, the most infamous Microsoft Visual C++. All three of them are commercial software, and intel pays attention to its own platform, so its compiler may only run on its own platform. Of course, this concern makes it have many advantages in its own platform, such as faster compiled programs. Bjarne Stroustrup, the original founder of C++, maintains a list of C++ compilers that you can take a look at.
In the example, each program is very simple, compiling and testing using Gmail + in Linux. We may cover more about grub + in a later chapter, but there won't be a lot of space, because here we are talking about Clover plus, not glossy plus. If you really can't leave Windows, here's an alternative.
You can download and install Code::Blocks, which is a cross-platform IDE environment, and you have to be familiar with this IDE environment to compile the "hello_world.cpp" program we wrote in the previous section, which is actually very simple, as long as we use it on the command line.
Just do it. After running the above command, we will generate an executable program called "hello". In order to run it, we need to use it on the command line: this command is the command to run the program you just generated. Notice the ". /" before "hello", which means "hello" in the current directory.
This is the end of the content of "C++ compilation Environment Analysis". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.