Transformation of test_multithread_socket_textsearchbyexampledoc.cpp on hpc01 using DEV-C ++

Source: Internet
Author: User

This transformation aims to migrate the original data on the hpc01 node of the cluster.ProgramTo a Windows machine.

I think VC is too large, then decided to use DEV-C ++ as a development tool. You use it for the first time.

A transfer from hpc01 to Windows single-host platform using the DEV-C ++, the problem encountered

When using DEV-C ++, you need to go to the project options-> parameters-> linker

Add

1. C:/program files/DEV-CPP/lib/libws2-32.a (supporting multithreading in programs)

2. {MySQL home}/lib/opt/libmysql. A (supports connecting to the MySQL database in the Program)

Note: libmysql. dll (libmysql. dll) that comes with the MySQL installation package only supports the Visual C ++ development environment. To use dlltool.exe (which appears in a subdirectory of its installation directory when DEV-C ++ is installed) to process libmysql. dll and libmysql. Def files to generate libmysql..

 

Code
Dlltool--Input-Def libmysql. Def--Dllname libmysql. dll--Output-Lib libmysql.-K

Libmysql. Def has two sources: one is from somewhere in the MySQL installation directory, and the other is using the following command (you need to download the pexports tool)

 

Code
Pexports libmysql. dll>Libmysql. Def

 

In addition, libmysql. DLL needs to be placed under the root directory of the project during program debugging. Otherwise, the following

 

Code
Error connecting to database

Client does not support Authentication Protocol requested by server, consider upgrading MYSQL client.

 

This error is caused by the mismatch between the client and the server.

II.From hpc01 to Windows single-host platform DEV-C ++ using m SQL encountered problems

Download mysql-connector-java-5.x.x.zip, decompress the package, and copy the JAR file with the same name{Java_home}/JRE/lib/EXT/Directory.

Otherwise, the following error occurs.

Code
Com. MySQL. JDBC. Driver

 

Manifested in the programCodeTo

 

Code
Class. forname ("Com. MySQL. JDBC. Driver");

 

Cannot be executed successfully.

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.