In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what are the common problems of VS2019 connecting to MySQL database, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Starting to configure various environments in the afternoon, thinking that VS2019 can be used with MySQL. A lot of errors have been made. The successful configuration around 9: 00 p.m. Is shown below:
Next, let's talk about the specific steps:
(1) first of all, prepare the software of VS2019 and MySQL, which are available on their respective websites. I will not repeat them here.
(2) find the installation directory of MySQL, as shown in the figure, and find these two folders.
(3) create a new project and then create a new main.cpp file to prepare for the following configuration environment.
(4) Open the project properties, click the VC++ directory, and in the include directory, add the path to the include file in the MySQL installation directory here, as shown below:
(5) on the property page, open the include folder, select General, and add the path of the include file in the MySQL file in the additional include directory.
(6) continue on the property page, click the linker option, click General, and copy the lib path under the MySQL installation directory to the additional library directory.
(7) continue in the property page linker, click the input option to add the libmysql.lib file, note that you only need to copy the name libmysql.lib, there is no need to add the path. Similarly, this file is also in the lib directory in the mydql installation folder:
(8) looking at the platform at the top of the property page, it may make an error if you select x64line x32.
(9) copy the bin\ libmysql.dll under the MySQL installation directory to c:\ windows\ system32:
After this installation is complete, you can write test code. The test code is as follows:
# include # include # include "my_global.h" # include "mysql.h" using namespace std;int main () {cout
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.