-
Notifications
You must be signed in to change notification settings - Fork 555
Windows Install
- C++11
This documentation aims to provide the building steps for a Windows environment containing the following tools:
- Appropriate terminal/shell
- Git (throw command-line)
- CMake (throw command-line)
- VS 2012+ (for C++11 support)
The library is based on cmake
for the compilation. In order to build the library, you have to open a terminal and follow these steps:
# Clone the project
git clone https://github.com/Cylix/cpp_redis.git
# Go inside the the project directory
cd cpp_redis
# Get tacopie submodule
git submodule init && git submodule update
# Generate the Makefile using CMake
cmake .
This will generate a cpp_redis.sln
file (that is, a Visual Studio solution).
- Open this file with Visual Studio.
- Build the solution in the configuration (Debug, Release, ...) and for the platform (32, 64) of your choice.
Then, you can update your VC++ project configuration:
-
VC++ Directories > Include Directories: Add
CPP_REDIS_FOLDER_PATH/includes
andCPP_REDIS_FOLDER_PATH/tacopie/includes
(with the appropriate value ofCPP_REDIS_FOLDER_PATH
). -
VC++ Directories > Library Directories: Add
CPP_REDIS_FOLDER_PATH/{Debug|Release|...}/
(with the appropriate value ofCPP_REDIS_FOLDER_PATH
and configuration). -
Linker > Input > Additional Dependencies: Add
cpp_redis.lib
andtacopie.lib
.
Finally, you just have to include <cpp_redis/cpp_redis>
in your source files.
Please refer to this page of the wiki.
If you have a warning like the following when trying to link the library with your project:
error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug'
This is because there is a conflict between the Runtime Library used to compile cpp_redis and the Runtime Library used by another library you are using.
By default, cpp_redis is compiled using /MT mode, but you can use the MSVC_RUNTIME_LIBRARY_CONFIG
cmake variable to override this setting.
Please refer to this page of the wiki.
Need more information? Contact me.