找不到MySQL连接器cpp符号

问题描述 投票:1回答:1

我正在尝试在Mac OS X 10.9.2上编译mysql-connector-cpp

我从lp:〜mysql / mysql-connector-cpp / trunk下载了最后一个中继,并遵循以下说明:ftp://ftp.ntu.edu.tw/tmp/MySQL/doc/refman/5.5/en/connector-cpp-installation-source-unix.html

但是发生了一些带有Stl的链接器错误:

Linking CXX shared library libmysqlcppconn.dylib
Undefined symbols for architecture x86_64:
  "std::runtime_error::what() const", referenced from:
      vtable for sql::SQLException in mysql_art_resultset.cpp.o
      vtable for sql::InvalidArgumentException in mysql_art_resultset.cpp.o
      vtable for sql::InvalidInstanceException in mysql_art_resultset.cpp.o
      vtable for sql::MethodNotImplementedException in mysql_art_resultset.cpp.o
      vtable for sql::SQLException in mysql_art_rset_metadata.cpp.o
      vtable for sql::MethodNotImplementedException in mysql_art_rset_metadata.cpp.o
      vtable for sql::InvalidArgumentException in mysql_art_rset_metadata.cpp.o
      ...

有人遇到这个问题吗?是否需要一些其他标志?谢谢。

c++ mysql ld mysql-connector
1个回答
0
投票

这里是CMakes配置输出控制台的输出:

 Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
Building version 8.0.18
BIG_ENDIAN: 0
Building on system: Darwin-16.7.0 (x86_64)
Using cmake generator: Unix Makefiles
Building 64bit code
CMake Warning (dev) at cdk/cmake/config_options.cmake:112 (set):
  implicitly converting 'BOOLEAN' to 'STRING' type.
Call Stack (most recent call first):
  CMakeLists.txt:188 (add_config_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

Building static connector library
Configuring CDK as part of MySQL_CONCPP project
CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/CMakeLists.txt:88 (add_config)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cdk/cmake/config_header.cmake:55 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/CMakeLists.txt:90 (add_config)
This warning is for project developers.  Use -Wno-dev to suppress it.

Looking for SSL library.
-- found OpenSSL headers at: /Users/tim/Documents/Repository_Source_Code/ssl/openssl-1.1.1d/openssl-1.1.1d
-- OpenSSL library: /usr/lib/libssl.dylib
-- OpenSSL crypto library: /usr/lib/libcrypto.dylib
Using OpenSSL version: 1.1.1d
CMake Error at cdk/cmake/DepFindSSL.cmake:108 (message):
  Could not find SHA512_DIGEST_LENGTH symbol in sha.h header of OpenSSL
  library
Call Stack (most recent call first):
  cdk/cmake/DepFindSSL.cmake:324 (main)
  cdk/cmake/dependency.cmake:42 (include)
  cdk/CMakeLists.txt:96 (find_dependency)


Setting up Protobuf.
Setting up RapidJSON.
CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/CMakeLists.txt:106 (add_config)
This warning is for project developers.  Use -Wno-dev to suppress it.

Skipping second declaration of config option: THROW_AS_ASSERT (found in: /Users/tim/Documents/Repository_Source_Code/mysql_connector/mysql-connector-cpp-8.0.18/cdk/CMakeLists.txt)
CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/include/mysql/cdk/foundation/CMakeLists.txt:48 (ADD_CONFIG)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/include/mysql/cdk/foundation/CMakeLists.txt:53 (ADD_CONFIG)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/foundation/CMakeLists.txt:46 (ADD_CONFIG)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/foundation/CMakeLists.txt:60 (ADD_CONFIG)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/foundation/CMakeLists.txt:68 (add_config)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/protocol/mysqlx/CMakeLists.txt:33 (add_config)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cdk/cmake/config_header.cmake:61 (set):
  implicitly converting 'INERNAL' to 'STRING' type.
Call Stack (most recent call first):
  cdk/protocol/mysqlx/CMakeLists.txt:36 (add_config)
This warning is for project developers.  Use -Wno-dev to suppress it.

Wrote configuration header: /Users/tim/Documents/Repository_Source_Code/mysql_connector/cdk/include/mysql/cdk/config.h
Preparing to merge STATIC library: connector (xapi;devapi)
Connector library name: mysqlcppconn8-static
Building version 8.0.18
Generating INFO_SRC
Generating INFO_BIN
Install location: /usr/local/mysql/connector-c++-8.0
Connector libraries will be installed at: lib64

Project configuration options:

: BUILD_STATIC: ON
Build static version of connector library

: WITH_SSL: system
Either 'system' to use system-wide OpenSSL library, or custom OpenSSL location. (default : system)

: WITH_JDBC: OFF
Whether to build a variant of connector library which implements legacy JDBC API

Configuring incomplete, errors occurred!
See also "/Users/tim/Documents/Repository_Source_Code/mysql_connector/CMakeFiles/CMakeOutput.log".
See also "/Users/tim/Documents/Repository_Source_Code/mysql_connector/CMakeFiles/CMakeError.log".
© www.soinside.com 2019 - 2024. All rights reserved.