x64 release mode MySQL compile connection error resolution

Source: Internet
Author: User

System: Win8 64-bit

MySQL 5.7 32

The original project was debug 32-bit compiled

Later changed to release 64-bit result compilation yes, external symbols that cannot be resolved when the connection is made.

Workaround:

1 Download x64-bit DLL, lib file download link: Click to open the link

2 copy Libmysql64.lib and Libmysql64.dll to the database installation directory, which is the original Libmysql.lib sibling directory

3 in my program Lib is in this way. So I changed it here to Libmysql64.lib.

#pragma comment (lib, "Libmysql64.lib")

If you are adding a project attribute, change it to Libmysql64.lib.

4 after the compilation is passed, the 64-bit libmysql64.dll will be placed in the project catalog X64/debug (or C:/windows/system32

5 Other:

The include Lib for the database is added to the project properties.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

x64 release mode MySQL compile connection error resolution

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.