In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to use C++ language to do Linux development tools glue", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "how to use C++ language to do Linux development tools glue" bar!
I want to use the word "adhesive" to express "glue" that holds multiple tools together. For example, through shell scripts, we can concatenate OS commands, sed instructions, awk instructions, other script files, and so on. In linux C++ programming, we will inevitably use C++ language as a Linux development tool to glue makefile files. Through it, we can concatenate compile instructions, generate document operations, cleanup operations, and so on. In a sense, it is also equivalent to an adhesive.
The starting point of using C++ language as Linux development tool adhesive Makefile is to maintain the dependency of many files in a project and get a topology diagram of the source program. When we modify only one node in the diagram, we only need to compile the associated links in the topology diagram when recompiling. As a result, the compilation time is greatly shortened. Make has two major concepts: dependencies and rules. The rule rule defines an action rule for each dependency dependency. This fine-grained separation allows us to customize the behavior of software builds. For example, modify the compiler used, modify includepath, modify libpath, modify compilation options, and so on. The function of nmake in our common VC is similar to make.
The key point and difficulty of using make is to prepare Makefile files that use C++ language as the binder for Linux development tools. The syntax of Makefile is very different from other languages, so we should pay special attention to the difference between the TAB key and the space bar. There are many tools that can be used to help us generate Makefile. The most famous is GNU's autoconf. The preparation of a GNU program requires four tools: autoscan, aclocal, autoconf and automake.
We know that the three steps of GNU software installation are:. / configure, make, make install. Among them. / configure is to generate a makefile file based on autoconf, alocal and other tools. The make instruction calls the make instruction to compile the source program according to the rules of the makefile file. Make install is to perform the action indicated by the install rule in makefile (usually a copy operation). Make clean is to perform the action indicated by the clean rule in makefile (usually a rm operation). When we use Eclispe+CDT to develop Managed C++ Project, it generates Makefile through objects.mk,subdir.mk,sources.mk three files. If we look at the output at compile time, we can see the contents of the displayed Makefile file.
It can be said that if you want to compile C++ programs across platforms, then using C++ language as a Linux development tool Makefile is one of the most convenient mechanisms.
OCI has written a great perl script, MPC, for Douglas C.Schmidt 's ACE,TAO open source community. It generates project files that users want by platform information, a rule file, source code, such as Make, Nmake, Visual C++ 6, Visual C++ 7 and so on. Google Web Tookit and Celtix do similar things, except that they are for JAVA and MPC is for C++.
Thank you for your reading, the above is the content of "how to use C++ language to do Linux development tools glue". After the study of this article, I believe you have a deeper understanding of how to use C++ language to do Linux development tools glue, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.