-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 19 answers
- 8,269 views
-
- 0 replies
- 12 views
-
- 8 replies
- 2,712 views
-
Save 96% off a lifetime plan to iBrave Cloud Web Hosting — or alternative deal
By News Staff,
- ibrave
- web hosting
- (and 9 more)
- 0 replies
- 6 views
-
Save 96% off a lifetime subscription to iBrave Cloud Web Hosting + $20 Store Credit
By News Staff,
- ibrave
- neowin deals
- (and 9 more)
- 0 replies
- 7 views
-
Question
+Red King Subscriber²
Recently I tried creating same code in JAVA as in C# to brush up on JAVA - a similar helper library for easy querying of database and object mapping In the end I realized that Java is a terrible language (forced exception checking, terrible reflection, and lack of support for generics). Anyway, now I want to do the same thing (or at least attempt to) in C++ to learn C++
First thing first, I am trying to get MySQL connector to work with C++
Then I try, to add,
This file exists in the "include" directory, but I get error "cannot open source file"
So then I tried to build the thing from source (C++ libraries incompatible with each other unless built using the same compiler???), first attempt was like,
Which produced a "could not find a "mysql.h"" so... next up I followed a different set of directions based on post by Atul Patil in http://dev.mysql.com/doc/connector-cpp/en/connector-cpp-apps-windows-visual-studio.html which stated that I needed to build the MySQL server first to build the connector.
So I extracted the source for "mysql-5.6.26", navigated via CMD to, mysql-5.6.26/BUILD and ran "cmake .. -G "Visual Studio 14 2015 Win64"" which worked. I opened the generated solution in Visual Studio and mysqlclient which failed with,
Error LNK1181 cannot open input file 'C:/Users/{0}/Documents/C++/mysql-5.6.26/BUILD/libmysql/Debug/clientlib.lib' mysqlclient C:\Users\{0}\Documents\C++\mysql-5.6.26\BUILD\libmysql\LINK 1
Thoughts? TBH getting things to compile and run was my primary reason to avoid C++ in the past - followed by header files
EDIT,
Pile of ###### doesn't support VS 2015 yet, what a ######## disgrace,
http://forums.mysql.com/read.php?117,634127,634127#msg-634127
Link to comment
https://www.neowin.net/forum/topic/1272040-basic-c-project-with-mysql-connector/Share on other sites
0 answers to this question
Recommended Posts