Chapter 4 Preparations for vernacular C ++ 2nd preparations

Source: Internet
Author: User
Tags mysql gui mysql gui tools

Chapter 2. Preparation

"Whether you can become a programmer depends not on your computer foundation, but on your patience. "

 

2.1. Preparation

Programs to be installed are divided into two parts: "software (which can be run independently)" and "extended function library. The software provides independent installation programs. You can start the "Next" installation by double-clicking.

"Extended feature library" requires that they be installed under a unified directory. Generally, after installation, You need to configure PATH variables in code: blocks immediately.

2.1.1. installation list

  • Software
  • Code: blocks (IDE/C ++ integrated editing environment, including mingw)
  • Msys (Linux simulated environment in Windows)
  • MySQL (database/database)
  • MySQL GUI tools (Database Front/Database Front-end tools)
  • Gsoap (Web Service C ++ quick development tool)

 

  • C/C ++ extended function library
  • WxWidgets (GUI Library/GUI Library)
  • MySQL (access MySQL C code library)
  • MySQL ++ (access MySQL C ++ code library, based on MySQL
  • Boost (C ++ "quasi" standard library)
  • Iconv/iconvpp (c-form code conversion function library, and a simple encapsulation of iconv by the author in C ++)
  • Xerces-C (XML parsing)
  • XSD (a tool for binding XML and C ++ data structures)
  • Deelx (lightweight Regular Expression parsing class library, made in China)
  • SDL (Simple DirectMedia Layer/multimedia direct access layer for game programming)

2.1.2. Open Source Protocol

The software and libraries described in this chapter are all free software (including code libraries), but their respective open source license protocols are not exactly the same. You can safely use them for learning purposes. If you need to use these software for commercial purposes, Please carefully read the license agreements that come with the software (and libraries), understand and strictly abide by them.

The code or software written in this course can be distributed free of charge by readers, but relevant copyright notices in the code should be kept.

2.1.3. What is "Database"

How can we understand the relationship between "C ++ language" and "c ++ library? For example, we have learned English, but not necessarily become an English writer. To write beautiful articles in English, we 'd better have a complete set of Shakespeare. If we want to write software in C ++, we must not only learn the language itself, but also learn the relevant "Database ".

C ++ comes with a set of code libraries, usually referred to as the "C ++ standard library". Due to the "kinship" between C ++ and C ", therefore, the "C ++ standard library" also contains the "C standard library"-but the standard library is far from enough, so the "C ++ extension library" is available ".

The "library" usually contains a lot of code for implementing specific functions. It can be distinguished from the form of existence. The library can be a pile of source files, a compiled binary file, or both of them. These types of databases will be encountered in this chapter. For libraries in the form of pure source code, the installation is too simple: Create a folder and save the library files in it for backup, even if the installation is complete; for libraries to be compiled, this book is responsible for providing detailed and hands-on tutorials; you are responsible for providing: Careful, patient, and determination.

Unlike the concept of "software" or "program", although the "library" file is also written as "code", the "software" or "program" can usually run independently, the "library" file cannot run independently. Although it provides many powerful functions, it needs to be called by a program. Like an arsenal, there are many weapons inside: AK-47 rifles, M9 pistols, tanks, cannons ...... Good weapons must be used by good soldiers. A programmer who claims to be very familiar with the c ++ language wants to write programs without a few "Libraries" in his hand, just like a muscle 007, twist the kitchen knife in your hand and scream as tragic as the fight to the battlefield.

Libraries in the form of source code are also very simple to use: directly add the source files to the program project we wrote and compile the files. The library to be compiled is more complex. For the same source code, we can compile it into a binary library of different targets. The most typical distinction is: "Debug library", "release library", and "static library" and "dynamic library ".

  • Debug library vs. Release Library

The difference between "debug version" and "release version" is that the former contains debugging information, while the latter does not. A library with debugging information helps us to correct errors in the program. However, because debugging information is contained, therefore, the library of the debugging version is usually "fat" (the size of the compiled binary file is large ). If we think the error is almost corrected, we can use a relatively "slim" release.

  • Static library vs. Dynamic library

The two are short for "static Link Library" and "Dynamic Link" respectively.

"Static link" refers to the process of directly merging library files and program files into a large file to locate the functions of library files during the merging process. The process of program compilation occurs.

On the contrary, "Dynamic Link" exists independently of the library files and program files. When the program is running, it searches for related functions in the library files.

Using static links completely, we may get a fat program and send it directly to users. Using "Dynamic Links", we may need to distribute multiple files (programs and library files) to your users ). If you accidentally lose a file, users will complain that your software cannot run.

For a slightly complex software, "Dynamic Link" is usually used. Of course, to solve the tedious problem of distributing multiple files, we can usually create another "Install" program. I believe that you often install software, and you will be familiar with this. The appendix of this book also provides auxiliary courses on how to create the installation program.

2.1.4. Prepare the installation directory

For convenience, it is a good idea to install the above C/C ++ extension library in the same folder. This book assumes that the folder is "E:/cpp_ex_libs ". In the subsequent chapter, if you mention this folder (also known as a directory or path), replace it with the name of the folder you actually created.

2.1.5. learning methods in this Chapter

You can spend some time learning all the courses in this chapter (important indicator: complete the installation of all the software and extension libraries mentioned in this Chapter). Alternatively, you can only complete the code in section 2.2 :: install blocks software and go to Chapter 2 to start learning. When you need the relevant software or extension library, go back to this chapter and add relevant content-especially in the last section of this chapter :: blocks configuration-Global PATH variable ".

This chapter covers software and extended libraries, both open source and free software. You can use it with ease for your learning purposes only. If you need to modify, re-release, or intend to use the software for commercial development, Please carefully read the copyright instruction documents provided by each software and extension library and strictly abide by the relevant agreement.

In addition, this chapter involves software and extension libraries. New versions may appear when you read this book. Therefore, when you are preparing to download, please refer to the link of the latest official website.

-------------------------------------

If you want to communicate with me, click the following link to become a friend:
Http://student.csdn.net/invite.php? U= 112600 & C = f635b3cf130f350c

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.