1、redis for windows 下载地址:
https://github.com/tporadowski/redis
2、下载后解压,用vs2019打开
.\redis-version\msvs\RedisServer.sln
3、编译x64位版本
release.c出现不能打开release.h, 修改:
1)注释掉 #include "release.h"
2) 在 #include <string.h>之上添加:
#ifdef _WIN32
#include "Win32_Interop/Win32_Portability.h"
#define REDIS_GIT_SHA1 "00000000" /* TODO: Modify build to write them to release.h from the environment */
#define REDIS_GIT_DIRTY "0"
#define REDIS_BUILD_ID "0000"
#endif
4、编译 RedisServer, 成功!