如何在Windows上编译memcached?

Nav*_*K N 5 c windows memcached mingw libevent

我想memcached在Windows上运行.我已经下载了memcached最新的稳定版并在Windows 7下使用Mingw进行了编译.配置失败并出现错误,

检查libevent目录... configure:错误:需要libevent.你可以从http://www.monkey.org/~provos/libevent/获得它

  If it's already installed, specify its path using --with-libevent=/dir/
Run Code Online (Sandbox Code Playgroud)

然后我下载libevent并编译了它.这产生了3个DLL,libeventcore,libevent-extra和libevent-2.0.5.

memcached使用该选项再次运行configure --with-libevent.但由于某种原因,它再次失败并出现同样的错误.我不知道它失败的原因.任何人都可以帮我解决这个问题吗?或者有更好的方法memcached在Windows上运行吗?我已经看到很多用于Windows的预构建二进制文件.但他们都使用旧版本memcached.而AFAIK,Windows memcached在新版本中得到官方支持.

我在MinGW上使用Windows7 64位版本.

Jar*_*zek 1

make在 dir中运行后,libevent您就准备好了文件,但为了充分利用它,必须安装它们。所以make install需要步骤。如果您为其配置了前缀,它将位于您选择的目录中。否则就是/usr/local

make install所以也许在 libevent dir 中运行并configure从 memcache 运行而不带参数就足够了。

如果您在通过配置阶段时仍然遇到问题,请查看config.log。它显示了源文件和失败的 gcc 命令。

不幸的是,成功configure并不代表一切。后来它在包含sys/socket.h,netinet/in.h以及netdb.h可能还有-pthreadgcc 参数时失败。恐怕它无法在 mingw 上编译。至少在没有认真的移植工作的情况下是这样。