Closed cocobar closed 4 months 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 处。
看着像ABI的问题,vcpkg编译的时候也是使用vs2019做编译器么?
使用 vcpkg.exe install drogon:x64-windows 安装,
只是编译如下代码运行(使用 std:c++17 X64) int main() { printf("hello world");
}
在 ListenerManager.h 中运行时报错
0x00007FFFA249428C 处(位于 diopterNativeServer.exe 中)有未经处理的异常: Microsoft C++ 异常: std::bad_alloc,位于内存位置 0x00000063D11AF560 处。