drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.45k stars 1.1k forks source link

VS2019 编译出错 #1431

Closed cocobar closed 4 months ago

cocobar commented 1 year ago

使用 vcpkg.exe install drogon:x64-windows 安装,

只是编译如下代码运行(使用 std:c++17 X64) int main() { printf("hello world");

const std::string ipString = std::string("127.0.0.1");
//Set HTTP listener address and port
drogon::app().addListener(ipString, 8000);
//Load config file
//drogon::app().loadConfigFile("../config.json");
//Run HTTP framework,the method will block in the internal event loop
drogon::app().run();

}

在 ListenerManager.h 中运行时报错

struct ListenerInfo
{
    ListenerInfo(
        const std::string &ip,
        uint16_t port,
        bool useSSL,
        const std::string &certFile,
        const std::string &keyFile,
        bool useOldTLS,
        const std::vector<std::pair<std::string, std::string>> &sslConfCmds)
        : ip_(ip),   -------------------------->> 这行报错
          port_(port),
          useSSL_(useSSL),
          certFile_(certFile),
          keyFile_(keyFile),
          useOldTLS_(useOldTLS),
          sslConfCmds_(sslConfCmds)
    {
    }

0x00007FFFA249428C 处(位于 diopterNativeServer.exe 中)有未经处理的异常: Microsoft C++ 异常: std::bad_alloc,位于内存位置 0x00000063D11AF560 处。

an-tao commented 1 year ago

看着像ABI的问题,vcpkg编译的时候也是使用vs2019做编译器么?