mgclient is a C library interface for Memgraph database.
Building and installing on AppleTo build and install mgclient from source you will need:
Once everything is in place, create a build directory inside the project root directory and configure the build by running CMake from it:
mkdir build
cd build
cmake ..
NOTE: Dealing with OpenSSL might be a bit tricky. If OpenSSL is not available on the system, please use, e.g., brew package manager to install OpenSSL with the following command:
If cmake
can't locate OpenSSL, please set OPENSSL_ROOT_DIR
to a valid path. Examples follow:
# M1 with brew installed
cmake -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" ..
# Using only ls command
cmake -DOPENSSL_ROOT_DIR="$(ls -rd -- /usr/local/Cellar/openssl@1.1/* | head -n 1)" ..
After running CMake, you should see a Makefile in the build directory. Then you can build the project by running:
This will build two mgclient
library flavours: a static library (named libmgclient.a
) and a shared library (named libmgclient.dylib
).
To install the libraries and corresponding header files run:
This will install to system default installation directory. If you want to change this location, use -DCMAKE_INSTALL_PREFIX
option when running CMake.
To build and install mgclient from source you will need:
To install minimum compile dependencies on Debian / Ubuntu:
apt-get install -y git cmake make gcc g++ libssl-dev
On RedHat / CentOS / Fedora:
yum install -y git cmake make gcc gcc-c++ openssl-devel
Once everything is in place, create a build directory inside the source directory and configure the build by running CMake from it:
mkdir build
cd build
cmake ..
After running CMake, you should see a Makefile in the build directory. Then you can build the project by running:
This will build two mgclient
library flavours: a static library (usually named libmgclient.a
) and a shared library (usually named libmgclient.so
).
To install the libraries and corresponding header files run:
This will install to system default installation directory. If you want to change this location, use -DCMAKE_INSTALL_PREFIX
option when running CMake.
If you want to build and run tests, in the build directory run:
cmake -DBUILD_TESTING=ON -DBUILD_TESTING_INTEGRATION=ON ..
ctest
Building and installing on Windows
To build and install mgclient from source on Windows you will need:
mkdir build
cd build
cmake ..
cmake --build .
Depending on where OpenSSL is installed you might need to define OPENSSL_ROOT_DIR
, example follows:
cmake -DOPENSSL_ROOT_DIR="$VCPKG_ROOT\installed\x64-windows" ..
To install OpenSSL vcpkg can be used:
vcpkg install openssl:x64-windows
or you can download and install OpenSSL from here.
pacman -S --needed git base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain mingw-w64-i686-cmake mingw-w64-x86_64-cmake mingw-w64-i686-openssl mingw-w64-x86_64-openssl
Once the environment is ready, please run:
mkdir build
cd build
cmake .. -G "MinGW Makefiles"
cmake --build . --target install
Building WASM (Linux only)
Compiling mgclient
for wasm requires the Emscripten sdk. This is automated in the following steps:
Now there should be an mgclient.js
and an mgclient.wasm
found in mgclient/build/
The library provides header files located under the include folder. All library functionality is documented in these files in Doxygen format. You can also build HTML version of the documentation by running doxygen
command from project root directory.
All the examples of the usage of the mgclient are contained in the examples folder, including the C++ wrapper.
An example on how to include mgclient inside a CMake project is located under examples/CMakeLists.txt
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4