Failed to start the Debug
I'm newbie, when i start the application it got error. This is my main.cc
`#include <drogon/drogon.h>
int main() { drogon::app().setLogLevel(trantor::Logger::kTrace);
try {
drogon::app().addListener("127.0.0.1", 2201);
drogon::app().run();
}
catch (const std::exception& e) {
std::cerr << "Error: " << e.what() << std::endl;
}
return 0;
} `
The code failed on line drogon::app().addListener("127.0.0.1", 2201); the exception throwed is 'Error: vector too long'
I'm using Visual Studio Community 2022, this is output when build the project with VsCode:
[main] Building folder: d:/Code/WebC++/DrogonWin/build [build] Starting build [proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE" --build d:/Code/WebC++/DrogonWin/build --config Debug --target ALL_BUILD -j 22 -- [build] MSBuild version 17.13.9+e0f243f1e for .NET Framework [build] [build] main.cc [build] DrogonWin_test.vcxproj -> D:\Code\WebC++\DrogonWin\build\test\Debug\DrogonWin_test.exe [build] DrogonWin.vcxproj -> D:\Code\WebC++\DrogonWin\build\Debug\DrogonWin.exe [driver] Build completed: 00:00:02.796 [build] Build finished with exit code 0
This is callstack
I'm having the same problem. Did you figure it out?
I'm not remember exactly what i do, but it may relate to cmake or vcpkg, you can check or update thoes tools and try again
I also encountered this problem,
I installed the dependencies using vcpkg.
Finally, I found that when I ran cmake .. in the build directory, CMake used another openssl library on my computer instead of the openssl installed by vcpkg.
I then fixed this by specifying cmake to use vcpkg.cmake, and the error no longer occurs.
cmake .. -DCMAKE_TOOLCHAIN_FILE=D:/Software/vcpkg/scripts/buildsystems/vcpkg.cmake
So I think you can check if you are using the wrong library.