MySQL Forums
Forum List  »  Source, Builds, Binaries

Build error with the C++ connector
Posted by: Filip Leze
Date: November 01, 2021 04:20PM

dear members

I'm trying to build the C++ connector from source.
CMake seems successful and the build is encountering an error after starting well.

- Windows 10
- MinGW-w64 (not officially supported but still trying :-)
- cmake version 3.21.4
- make version 4.3
- g++ and gcc 11.2.0
- openssl 1.1.1l
boost libraries installed as well

Here is my cmake:

cmake . -DCMAKE_INSTALL_PREFIX=C:/msys64/home/Filip/MySQL_CONCPP -DWITH_SSL=C:/msys64/mingw64/bin -DWITH_BOOST=C:/msys64/mingw64/bin -DBUILD_STATIC=ON -G "MSYS Makefiles"

Seems working good and here are the last rows returned
Wrote configuration header: C:/msys64/home/Filip/test/cdk/include/mysql/cdk/config.h
Preparing to merge STATIC library: connector (xapi;devapi)
Connector library name: mysqlcppconn8-static
Building version 8.0.27
Generating INFO_SRC
Generating INFO_BIN
Install location: C:/msys64/home/Filip/MySQL_CONCPP
Connector libraries will be installed at: lib64

Project configuration options:

Build static version of connector library

: WITH_SSL: C:/msys64/mingw64/bin
Either 'system' to use system-wide OpenSSL library, or custom OpenSSL location. (default : system)

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

-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:


-- Build files have been written to: C:/msys64/home/Filip/test

That sounds good, so I do make which is building for about 30 seconds and here are the few lines before it stops:


[ 98%] Linking CXX static library libprotocd.a
[ 98%] Built target libprotoc
[ 99%] Building CXX object protobuf-3.11.4/cmake/CMakeFiles/protoc.dir/__/src/google/protobuf/compiler/
[100%] Linking CXX executable ../../runtime_output_directory/protoc.exe
[100%] Built target protoc
== Extrnal build done
[ 2%] Built target protobuf-build
[ 4%] Building C object cdk/CMakeFiles/openssl-applink.dir/C_/msys64/mingw64/include/openssl/applink.c.obj
gcc.exe: warning: C:/msys64/wd4152: linker input file unused because linking not done
gcc.exe: error: C:/msys64/wd4152: linker input file not found: No such file or directory
gcc.exe: warning: C:/msys64/wd4996: linker input file unused because linking not done
gcc.exe: error: C:/msys64/wd4996: linker input file not found: No such file or directory
make[2]: *** [cdk/CMakeFiles/openssl-applink.dir/build.make:76: cdk/CMakeFiles/openssl-applink.dir/C_/msys64/mingw64/include/openssl/applink.c.obj] Error 1
make[2]: *** Deleting file 'cdk/CMakeFiles/openssl-applink.dir/C_/msys64/mingw64/include/openssl/applink.c.obj'
make[1]: *** [CMakeFiles/Makefile2:851: cdk/CMakeFiles/openssl-applink.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Filip@workstation MINGW64 ~/test

Any idea what can it be or should I just go on visual studio?
Same error if I try BUILD_STATIC=OFF (default setting)

thanks in advance

Options: ReplyQuote

Written By
Build error with the C++ connector
November 01, 2021 04:20PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.