First, download the Redis Windows version; Download: https: //github.com/microsoftarchive/redis; extract to: E: \ Software \ redis-3.0;
Second, open the project with VS:
1. Open the file E: \ Software \ redis-3.0 \ msvs; click RedisServer.sln, with open VS; click OK all warnings, as shown below: As used herein, the VS2015
2. Run all solutions:
After loading the project as shown:
Right-click the solution, choose to re-build the solution, the solution build success
3. Open the file E: \ Software \ redis-3.0 \ msvs \ x64 \ Debug, view the generated lib and exe
Third, the new project TestRedis
1. Add the directory that contains, click TestRedis project, Right Properties -> C / C ++ -> General -> Additional Include Directories, enter the following two directories with ";" was separated:
A, add Redis library source code, the path: E: \ Software \ redis-3.0 \ src;
B, add HiRedis library source code, the path: E: \ Software \ redis-3.0 \ deps \ hiredis;
2. Add additional dependencies: hiredis.lib, Win32_Interop.lib; click TestRedis project, right Properties -> Linker -> Input -> Additional Dependencies directory entry input library;
3. Restart Redis-server, opens the CMD, navigate to Redis-server directory, input , as follows
four,