A rare trap in mysql CAPI!

Source: Internet
Author: User
# Define destdio. h # includewindows. h # shortdemysql. hmysql. h. The header file uses windows. h, but it does not include others. As a result, I created a console project to import mysql. after h, I thought I could connect to the database. A bunch of mysql_com.h errors were found, so I was depressed! MySQL later users should remember that whether your project is win32 or not

# Include stdio. h # include windows. h # include mysql. h mysql. h. The header file uses windows. h, but it does not include others. As a result, I created a console project to import mysql. after h, I thought I could connect to the database. A bunch of mysql_com.h errors were found, so I was depressed! MySQL later users should remember that whether your project is win32 or not

# Include <stdio. h> # include <windows. h> # include <mysql. h>

The mysql. h header file uses windows. h, but does not contain others. As a result, I created a console project.

After importing mysql. h, I thought I could connect to the database. As a result, a bunch of mysql_com.h errors were reported, which is depressing!

After MySQL, remember that whether your project is win32 or not, you must import the windows. h file before mysql. h!

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.