mirror of
https://github.com/mariadb-corporation/mariadb-connector-cpp.git
synced 2025-07-20 16:35:25 +00:00

Added missing headers to msi. Headers now installed into include/mariadb ALl headers have been renamed from .h to .hpp ConnCpp.hpp renamed to conncpp.hpp(all small letters) All headers but conncpp.hpp, have been moved to conncpp subdirectory in include, and in the msi All exception classes have got explicit (exported from dll on Windows) copyconstructor decluration, and definition of those constructors in the connector library. And to stay on the safe side, all other constructors and destructors definitions have been moved to library side. Fixed the error, that few exception methods were declared as dllimported, and defined in the header at the same time.
1.7 KiB
1.7 KiB
Building the Connector/C++
Following are build instructions for various operating systems. In order to build you will need compiler supporting C++11 standard.
Windows
Prior to start building on Windows you need to have following tools installed:
- Microsoft Visual Studio https://visualstudio.microsoft.com/downloads/
- Git https://git-scm.com/download/win
- cmake https://cmake.org/download/
- WiX Toolset https://wixtoolset.org/releases/
git clone https://github.com/MariaDB-Corporation/mariadb-connector-cpp.git
cd mariadb-connector-cpp
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCONC_WITH_MSI=OFF -DWITH_SSL=SCHANNEL .
cmake --build . --config RelWithDebInfo
msiexec.exe /i wininstall\mariadb-connector-cpp-0.9.1-win32.msi
Please mind msi file name - it's will be different depending on current connector version, and also architecture suffix may be different
CentOS
sudo yum -y install git cmake make gcc openssl-devel
git clone https://github.com/MariaDB-Corporation/mariadb-connector-cpp.git
mkdir build && cd build
cmake ../mariadb-connector-cpp/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_SSL=OPENSSL
cmake --build . --config RelWithDebInfo
sudo make install
Debian & Ubuntu
sudo apt-get update
sudo sh apt-get install -y git cmake make gcc libssl-dev
git clone https://github.com/MariaDB-Corporation/mariadb-connector-cpp.git
mkdir build && cd build
cmake ../mariadb-connector-cpp/ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONC_WITH_UNIT_TESTS=Off -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_SSL=OPENSSL
cmake --build . --config RelWithDebInfo
sudo make install