Hi,
I am somewhat unsure how to proceed but have made some progress.
A while ago I downloaded XAMPP and got myself a test MySQL database up and running with Apache and phpMyAdmin etc for PHP development on localhost:3306
I now wish to access this database using C++ and VS2017 community. I downloaded and installed the mysql-for-visualstudio-1.2.9.msi
Then I downloaded both the latest 32 and 64 bit c++ Connectors 8.0.22 and extracted them to my C:MYSQL/MYSQL32 and C:MYSQL/MYSQL64. Both these folders contain includes and librarys, but I dont understand that
In VS2017, I made a new console app and managed to connect to the test database using the Server Explorer and gave my pw and login.
Im thinking that I need to do something like click on my solution and add some info in Properties/ C++/ Additional Include Directories, and then go to Linker General and assign something to Additional Library dependencies.
my #include <mysql.h> is showing error underline so my test code wont run. I cant see this header file in my connection dowload, nor does a search on the c drive reveal where it is, doesnt look like its in XAMPP anywhere.
(Im assuming that as I have XAMPP with Mysql installed and VS2017 connects to it, that I dont need to install the MySQL server from Oracle ??? - I dont want 2 different servers running on my test machine - but will this give me the include files for c++ ???)
(Ive also googled that I need to add libmysql.lib and mysqlcppconn.lib to my built folder, but I am nowhere near that stage yet.)
Any help much appreciated, this is well beyond me
I am somewhat unsure how to proceed but have made some progress.
A while ago I downloaded XAMPP and got myself a test MySQL database up and running with Apache and phpMyAdmin etc for PHP development on localhost:3306
I now wish to access this database using C++ and VS2017 community. I downloaded and installed the mysql-for-visualstudio-1.2.9.msi
Then I downloaded both the latest 32 and 64 bit c++ Connectors 8.0.22 and extracted them to my C:MYSQL/MYSQL32 and C:MYSQL/MYSQL64. Both these folders contain includes and librarys, but I dont understand that
In VS2017, I made a new console app and managed to connect to the test database using the Server Explorer and gave my pw and login.
Im thinking that I need to do something like click on my solution and add some info in Properties/ C++/ Additional Include Directories, and then go to Linker General and assign something to Additional Library dependencies.
my #include <mysql.h> is showing error underline so my test code wont run. I cant see this header file in my connection dowload, nor does a search on the c drive reveal where it is, doesnt look like its in XAMPP anywhere.
(Im assuming that as I have XAMPP with Mysql installed and VS2017 connects to it, that I dont need to install the MySQL server from Oracle ??? - I dont want 2 different servers running on my test machine - but will this give me the include files for c++ ???)
(Ive also googled that I need to add libmysql.lib and mysqlcppconn.lib to my built folder, but I am nowhere near that stage yet.)
Any help much appreciated, this is well beyond me