uWebSockets https://github.com/uNetworking/uWebSockets
如何在 Visual Studio C++ 中使用它?我希望实现一个简单的 websocket 服务器。我不想使用 Makefile,希望使用普通的 Visual Studio 项目构建。
uWebSockets https://github.com/uNetworking/uWebSockets
如何在 Visual Studio C++ 中使用它?我希望实现一个简单的 websocket 服务器。我不想使用 Makefile,希望使用普通的 Visual Studio 项目构建。
这是如何使用 Visual C++ IDE 项目中的 uWebsockets,一步一步:
set VCPKG_DEFAULT_TRIPLET=x64_windows
vcpkg install uwebsockets
此时有一个文件夹vcpkg\installed\x64-windows
,其中包含头文件和库文件和 dll(如果您需要 dll)。
在您的 Visual C++ 项目属性中,设置 VC 目录中的包含目录和 lib 目录。
然后#include <uwebsockets/App.h>
粘贴来自 uwebsockets 的代码。