Bug #86843 mysql-connector-cpp 1.1.9 has error when I cmake
Submitted: 28 Jun 2017 2:36 Modified: 9 Aug 2017 11:03
Reporter: zhang_feiren sam Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / C++ Severity:S3 (Non-critical)
Version:1.1.9 OS:Windows (windows 10)
Assigned to: Assigned Account CPU Architecture:Any
Tags: cmake, mysql-connector-cpp-1.1.9

[28 Jun 2017 2:36] zhang_feiren sam
Description:
Basic Env:
  OS: windows 10

  cmake version: 3.9.0-rc4
  download url:https://cmake.org/download/

  boost version: 1_64_0
  download url:http://www.boost.org/users/history/version_1_64_0.html

  mysql-server version:5.6.27-winx64
  download url:https://dev.mysql.com/downloads/mysql/
  
  mysql-connector-cpp version:1.1.9
  download url:https://github.com/mysql/mysql-connector-cpp/tree/1.1

Issue:
  I want to build vs2010 project.at mysql-connector-cpp-1.1/ root directory,I execute command:
  cmake -G "Visual Studio 10 2010 Win64" 
    -DBOOST_ROOT="D:\developer\boost_1_64_0" 
    -DMYSQL_DIR="D:\developer\mysql-5.6.27-winx64" 
    -DMYSQLCLIENT_STATIC_LINKING=1 
    -DMYSQL_INCLUDE_DIR="D:\developer\mysql-5.6.27-winx64\include" 
    -DMYSQL_LIB_DIR="D:\developer\mysql-5.6.27-winx64\lib"
  
  Make an Error:
   CMake Error at FindMySQL.cmake:742 (message):
   Could not determine the MySQL Server version

  when I download mysql-connector-cpp-2.0 to cmake,it's ok,no problem.but I don't know about branch 2.0 how to use.
  please help me.Thanks.

How to repeat:
This is my Basic Env:

  OS: windows 10

  cmake version: 3.9.0-rc4
  download url:https://cmake.org/download/

  boost version: 1_64_0
  download url:http://www.boost.org/users/history/version_1_64_0.html

  mysql-server version:5.6.27-winx64
  download url:https://dev.mysql.com/downloads/mysql/
  
  mysql-connector-cpp version:1.1.9
  download url:https://github.com/mysql/mysql-connector-cpp/tree/1.1

  This issue will be repeated.

Suggested fix:
please help me.analysis this issue.
[29 Jun 2017 3:44] zhang_feiren sam
it's same issue when I build vs2015,
cmake -G "Visual Studio 14 2015 Win64" -DBOOST_ROOT="D:\developer\boost_1_64_0" -DMYSQL_DIR="D:\developer\mysql-5.6.27-winx64" -DMYSQL_INCLUDE_DIR="D:\developer\mysql-5.6.27-winx64\include" -DMYSQL_LIB_DIR="D:\developer\mysql-5.6.27-winx64\lib" -DMYSQLCLIENT_STATIC_LINKING=0
[4 Jul 2017 15:24] Luis Silva
Hi!

Can you please copy/paste the error cmake gives passing --trace option? (Only FindMySQL.cmake part)

Regarding 2.0, its a DMR version, with a new API (which needs server xplugin)
Can find more about it here:
https://dev.mysql.com/doc/refman/5.7/en/document-store.html

Best Regards,
Luís
[6 Jul 2017 9:28] zhang_feiren sam
command line tip

Attachment: fox(07-06-17-26-03).jpg (image/jpeg, text), 162.66 KiB.

[6 Jul 2017 9:40] zhang_feiren sam
mysql-connector-cpp-1.1.9 directory:

Attachment: fox(07-06-17-26-02).jpg (image/jpeg, text), 165.33 KiB.

[6 Jul 2017 9:51] zhang_feiren sam
while I copy \mysql-connector-cpp-2.0\cdk\cmake\FindMySQL.cmake file \mysql-connector-cpp-1.1\ directory,It's OK.No problem.