如何解决使mysql-connector-c++-1.1.7错误
How to solve make mysql-connector-c++-1.1.7 error
我跟随https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-installation-source-unix.html当我使用make
下面是我发生的事情
[ 8%] Building CXX object driver/CMakeFiles/mysqlcppconn.dir/mysql_resultbind.cpp.o
/root/git/MetricBench.perclab/build/mysql-connector-cpp/driver/mysql_resultbind.cpp: In function ‘sql::mysql::st_buffer_size_type sql::mysql::allocate_buffer_for_field(const MYSQL_FIELD*)’:
/root/git/MetricBench.perclab/build/mysql-connector-cpp/driver/mysql_resultbind.cpp:89:10: error: ‘MYSQL_TYPE_JSON’ was not declared in this scope
case MYSQL_TYPE_JSON:
^
driver/CMakeFiles/mysqlcppconn.dir/build.make:284: recipe for target 'driver/CMakeFiles/mysqlcppconn.dir/mysql_resultbind.cpp.o' failed
make[2]: *** [driver/CMakeFiles/mysqlcppconn.dir/mysql_resultbind.cpp.o] Error 1
CMakeFiles/Makefile2:92: recipe for target 'driver/CMakeFiles/mysqlcppconn.dir/all' failed
make[1]: *** [driver/CMakeFiles/mysqlcppconn.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2
我曾经找到其他人提供的解决方案
This can be fixed by checking for the MYSQL_TYPE_JSON at compile time and optionally including those switch/case conditionals only if detected in the underlying C API.
我真的不知道该怎么解决这个问题,有什么建议吗?thx
使用mysql-connector-c++-1.1.6。1.1.7添加了JSON类型,连接器C 6.1.6似乎不支持它,或者需要进行一些额外的更改。
也许是别的原因,但我没有太在意,1.1.6就像一种魅力。
找到它:
MySQL连接器/C++1.1.7的变化(2016-01-20)
若要从源代码构建Connector/C++,必须使用MySQL 5.7(5.7.9或更高版本)的General Availability版本或Connector/C 6.1.8或更高级别
https://dev.mysql.com/doc/relnotes/connector-cpp/en/news-1-1-7.html
第二个误区是在哪里下载连接器/C 6.1.8源代码?下载页面(https://dev.mysql.com/downloads/connector/c/)在我写这篇文章的时候,它只提供连接器/C 6.1.6…
嗯
经过另一项研究,连接器/C 6.1.7和6.1.8似乎不会以社区版本发布(https://downloads.mysql.com/docs/connector-c-relnotes-en.a4.pdf)但是,在本文档中没有提到在6.1.8:中添加JSON类型支持
MySQL连接器/C 6.1.8的变化(2015-12-15)
安全注意事项•此版本的Connector/C将链接的OpenSSL库升级到1.0.1p版本新的OpenSSL版本在http://www.openssl.org/news/vulnerabilities.html.
MySQL连接器/C 6.1.7的更改(2015-04-21)
安全说明•安全修复:Connector/C 6.1 Commercial已更新为使用OpenSSL 1.0.1m版本,据公开报道,它不易受到CVE-2015-0286的攻击。由于Connector/C 6.1.7中唯一的变化是包含了公开报告的OpenSSL库不受CVE-2015-0286的影响,并且由于Oracle生产的MySQL社区构建使用YaSSL据报道未受CVE-2015-0286影响的库,Oracle将不会生成内部版本用于连接器/C社区的6.1.7版本。这意味着社区版连接器/C将跳过版本6.1.7。(Bug#20747718,CVE-2015-0286)
- mysql C++ connector [mysql-connector-c++-8.0.19-linux-glibc2
- 在 MySQL/Connector C++中使用 SQL 联接
- 如何在MySQL Connector/C++ 8.0中使用DATETIME?
- 如何使用MySQL Connector and Make设置C++项目
- C++ - Mysql connector
- 如何使C++Mysql Connector与Visual Studio 2019一起使用?
- 使用 MySQL Connector C++ 链接 mysqlcppconn-static 时出现问题
- MySql connector-c++不会在QtCreator中链接,但在Raspberry pi3上本地工作正常
- 尝试在Windows上构建MySQL-Connector-CPP
- 在Windows上的DEBUG,VS2K17上的调试中的MySQL-Connector C 应用程序
- 我正在使用 mysql-connector-c++ 1.1.9,但我想通过套接字而不是 tcp 连接到 mysql 数据库
- MySQL-connector-C++ 8.0 连接被拒绝
- 使用 CMake 和 C++ 运行 mysql-connector
- Visual Studio Name Mangling "YAPEAV" and Mysql connector
- 如何解决使mysql-connector-c++-1.1.7错误
- MySQL Connector for C++| MySQL_Connection::setReadOnly()在set
- MySQL C++ Connector UPDATE
- MySQL connector c++ linux
- C++ Mysql Connector requires boost
- MySQL Connector c++ cgi程序是否像php一样容易受到MySQL注入的攻击?