Lightweight Linux C ++ Development Guide

As a product development, a smoothly integrated development environment is essential. Most of the time, the development manager to focus on investment in product demand analysis at the expense of the quality of even basic research and development of integrated development environments are not uniform. Of course, if you only need to deploy the project or no cross-language development needs in a single environment, usually doing so it will not cause serious problems. But once you need to face a relatively complex system, communication between heterogeneous systems and other issues. In the beginning of the project, the various parts of a unified integrated development environment is very important. I will introduce the solution I use in enterprise development work to you through a series of articles. Of course, these are likely to contain a strong personal characteristics, not necessarily fully applicable to all businesses, and even some views are debatable. Just want to be able to play a role in better ideas, to explore interest in a small partner.

Currently, I work as a main desktop system includes a lightweight, browser-based, and the underlying communication development of Linux systems. The language you want to use, including Java, C ++ and JavaScript. There is no demand and distributed big data. The reason need to develop the underlying communication mainly, we have a lot of data is directly available through hardware devices, so work in this part of the main use C ++ to complete the business layer taking into account the efficiency of the deployment and development emphasis on using Java to achieve, the preceding is not too many choices JavaScript is the best choice.

First developed elaborate on the adaptability of Java and C ++ these two languages. As businesses and individuals positioning's sake, these two mainstream language I have some experience in the development, met all kinds of wonderful demand to achieve a variety of amazing features. Relatively speaking, the smaller the underlying function module is in operational efficiency considerations, I would prefer to use C ++ to do. And for business systems, components or services need more than a 10-person team to develop the Java project is still my only choice. Whether it is business or personal open source, you are facing specific development tasks are more inclined to demand rather than scientific research, the use of C ++ as a development language, no matter how rich you are bound to experience the development of language features into a quagmire caused can not extricate themselves. In comparison, some machines to sacrifice performance in exchange for faster iterations, fewer BUG and richer ecology. Therefore, as a development engineer, in any case do not stay in a rut, new technology or new language may only need one line of code can easily solve your finished five years ago need 100 lines of code to the task, if you then also to the older generation itself, then from out of the market it is not far away.

Next Closer to home, a lot of C ++ development tools under Linux, it was customary with vim, some people will use QtCreator or other messy IDE. And I recommend using Microsoft's development artifact Visual Studio Code, is also more flexible than it is lightweight enough with other products. The only inconvenient is to use it to develop products based on Qt inappropriate. But I've addressed previously, end interface using JavaScript is a more reasonable choice.

After the installation is complete, you need a C ++ plug-ins, here recommend Microsoft's official version:

After completion you can and your little friends happy work. So, how to compile and debug it? In fact vsc itself provides a configuration file to accomplish these tasks. But I do not recommend you to learn it. I recommend you to do the traditional work through the Makefile, because doing so would make your project with a wider range of adaptability. This is why many people recommend reason to use vim in Linux as a development tool, but direct use vim, development efficiency is too low.

Finally, tell us about how to debug. I believe if you search the Internet Linux vsc debug few keywords will pop up a lot of answers, but these are not my favorite. We use vsc original intention is to enable developers to become efficient and simple, any extra configuration should give up. Now that we have adopted as our Makefile make and compiler tools, simply by compiling gdb debugger version of the condition can be obtained. Then we add a configuration file launch.json to vsc, specific methods to generate online. Then "program" corresponds to a value specified for the generated file name Makefile.

 F5 to debug breakpoint.

The last time submit the code, only the source file and the corresponding Makefile can be.

Guess you like

Origin www.cnblogs.com/learnhow/p/11707336.html