简体   繁体   English

如何使用VS2015社区安装ZeroMQ for C ++

[英]How to install ZeroMQ for C++ using VS2015 community

I am trying to learn networking in windows in C++ (specifically for making a very simple mmo server). 我正在尝试用C ++学习Windows中的网络(专门用于制作一个非常简单的mmo服务器)。

I was reading about cross-platform-ness and socket complexity and came accross both protobuf and zeroMQ quite a lot. 我正在阅读关于跨平台和套接字复杂性的内容,并且非常多地涉及protobuf和zeroMQ。

After reading about zeroMQ I decided it makes sense for an mmo server. 在阅读了关于zeroMQ之后,我认为mmo服务器是有意义的。

So i went over to the zeroMQ website and downloaded the msi installer. 所以我去了zeroMQ网站并下载了msi安装程序。 I ran it, and now i'm stuck. 我跑了,现在我被卡住了。

I don't quite understand what the MSI did... Did it plop a zeroMQ.dll in system32? 我不太明白MSI做了什么...它是否在system32中输入了一个zeroMQ.dll? Di I still need to get the C++ binding? 我还需要获得C ++绑定吗? Basically, how do you install zeromq for C++? 基本上,如何为C ++安装zeromq?

PS extra points if someone shows me how to do it with Nuget. 如果有人告诉我如何使用Nuget做PS,请加PS。 I guess that's why I don't know how to install libraries manually, I always use Nuget... 我猜这就是为什么我不知道如何手动安装库,我总是使用Nuget ...

Thanks. 谢谢。

Nuget does have a package for ZeroMQ, but that seems to be only for C# currently. Nuget确实有一个ZeroMQ ,但这似乎只适用于C#。

The MSI you installed contains Python binding for ZeroMQ, and is installed for the selected python version in the installer. 您安装的MSI包含ZeroMQ的Python绑定,并在安装程序中为选定的python版本安装。

For C++, they have pre-build binaries on their download page . 对于C ++,他们在下载页面上预先构建了二进制文件。 However, these libraries are build with an older version of Visual Studio, which are not compatible with Visual Studio 2015. If you want to use ZeroMQ, i'm afraid you are going to have to build the library your self. 但是,这些库是使用较旧版本的Visual Studio构建的,它与Visual Studio 2015 不兼容 。如果您想使用ZeroMQ,我担心您将不得不自己构建库。

When you have successfully build ZeroMQ, you can follow their guide to get a feeling of how to use it. 成功构建ZeroMQ后,您可以按照他们的指南了解如何使用它。 Or you can add the C++ bindings which has a pretty and easy-to-use interface. 或者您可以添加具有漂亮且易于使用的界面的C ++绑定

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM