Cleverly compile MySQL code on Windows

Source: Internet
Author: User
Tags mysql code

If you are not proficient in compiling MySQL code on the Windows platform, you can use our article to better understand the actual operations of compiling MySQL code, any questions about the knowledge mentioned in this article can be found through the CSDN MySQL (the best combination with PHP ).

MySQL (the best combination with PHP) @ CHINA support forum for help.

There is no innovation in the things mentioned in this article, just a summary of the existing documents in MySQL (the best combination with PHP.

I. Why compile the code?

When I was a child, my mother told me that I had to make a plan before doing things. Otherwise, I would not be able to do things, so I had to have a purpose. I don't know my friends who have read this article

Will you pay attention to the MySQL (best combination with PHP) manual. The MySQL (best combination with PHP) online manual recently shows a "Beyond" trend. Most of the content described in this manual is available in Development versions, I hope that I can get the opportunity to experiment while reading. At the same time, I hate various bugs in software like other friends, so I need to compile MySQL code myself. Of course, my initial intention was to use Intel C ++ to re-compile MySQL (the best combination with PHP) code for better performance.

Ii. How to prepare the compiled code

This part contains the following key points. Please note that.

Compiler

Cygwin

Memory

Patience

Compile MySQL (the best combination with PHP) code using GCC, VC6.0, and VC7.1 in Cygwin. If you use Intel C ++

We recommend that you use it with VC6.0. The reason why VC 7.0 is not recommended is that its own BUG has been fixed, but it is not publicly available .), If no patch is installed, it may cause errors. inline optimization can be solved temporarily ). For VC6.0, install SP4 or SP5 and the corresponding processor support patch packages.

Most of cygwin and MySQL (the best combination with PHP) code is written in Linux, so many practical tools and configuration scripts are * nix

Therefore, we need to use Cygwin as a Unix simulation environment. During installation, select autoconf automake gnu make libtool bison perl. In addition, the development of MySQL (the best combination with PHP) uses bk for management, and bk clients also need to run with cygwin. If you only want to compile the officially released Windows code, you do not need to care about this.

Memory, compiling MySQL (the best combination with PHP) code is very time-consuming, at least I think so. I suggest you have a machine with enough memory,

Otherwise, it will make you feel as exaggerated as if you were dead ...).

PATIENCE: The first time you compile MySQL (the best combination with PHP), especially the code in development, you will inevitably encounter various troubles and try to overcome them.

No one should succeed for the first time. If these small problems cannot be solved, how can we read MySQL code? Therefore, you have more confidence and patience.

3. obtain resources

I hope that I have prepared most of the things after reading the second section. Besides the compiler and cygwin, we also need to be accurate.

To download the standby bk client, go to www.bitkeeper.com. If you do not know the website of cygwin, please go to www.cygwin.com.

When the tools are ready, we can access MySQL (the best combination with PHP) .bkbits.net. here we can see a table. Each table

The project corresponds to a MySQL (the best combination of PHP and MySQL) project. We care about the project named MySQL (the best combination of PHP and PHP)-4.1, this is the Development tree of MySQL 4.1.x (the best combination with PHP.

Get code:

Shell> bk clone bk: // MySQL (the best combination with PHP) .bkbits.net/MySQL (the best combination with PHP)-4.1 MySQL (the best combination with PHP)-4.1

Update MySQL code:

Shell> bk pull bk: // MySQL (the best combination with PHP) .bkbits.net/MySQL (the best combination with PHP)-4.1 MySQL (the best combination with PHP)-4.1

With the above two commands, we can get and synchronize MySQL (the best combination with PHP) 4.1.x code in development at any time, for the first download, the entire process is very slow. About 100 MB of things need to be downloaded, decompress the package, and then merge the code. Other projects listed in MySQL (the best combination with PHP) .bkbits.net are:


MySQL (best combination with PHP)-4.0
MySQL (best combination with PHP) 4.0.X development tree

MySQL (best combination with PHP) doc
MySQL (best combination with PHP) Documentation

MySQL (best combination with PHP) odbc3
MySQL (best combination with PHP) ODBC driver

MySQL (best combination with PHP)-3.23
MySQL (the best combination with PHP) 3.23.X development tree, yellow yesterday.

MySQL (best combination with PHP)-4.1
MySQL (the best combination with PHP) 4.1.x development tree, work focus.

MySQL (best combination with PHP)-5.0
Next-generation MySQL (the best combination with PHP)

MySQL (best combination with PHP) cc
MySQL (best combination with PHP) Control Center

Myodbc-3.52
Initially compatible with MySQL (the best combination with PHP) 4.1 odbc driver
 

We can use the same method to obtain and synchronize MySQL code at any time.

4. Generate Windows code

By default, the downloaded code is not suitable for direct use. copy the code to another directory and use the BUILD directory.

The compile-pentium-max utility is used to configure the code. After the configuration is complete, use the utility make_win_src_distribution In the scripts directory to generate a code suitable for Windows, the Code obtained in this way is like the Code officially downloaded. The final product is a tar package. Execute these utilities, that is, shell scripts, in the top-level directory of the code tree.

5. Compile the code

After completing the above work, it should be the easiest to compile MySQL code. You can directly use VC 6.0 or VC. NET 2003 to open the project.

Compile the file. Other class libraries are not required for the whole process.

Related urls:

MySQL (best combination with PHP) @ china www.help2u.org

MySQL (the best combination with PHP) AB www. MySQL (the best combination with PHP). com

MySQL (the best combination with PHP) Mailing List lists. MySQL (the best combination with PHP). com

MySQL (best combination with PHP) defect Tracking bugs. MySQL (best combination with PHP). com

Finally, please note that the MySQL code obtained in the way described in this article (the best combination with PHP) follows the GPL protocol. For details about GPL, please refer to the relevant website.

Related Article

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.