Closed bernardopadua closed 1 year ago
You'd better to install drogon by vcpkg install drogon[ctl]:x64-windows
and use the drogon_ctl create project
command to create your project.
Hello @an-tao.. Thanks for your reply.. Im still strugling to build without errors, I don
t know if your main dev scenario is Windows. I did use drogon_ctl, but I`m having problems similarly to this one: https://github.com/drogonframework/drogon/issues/1208
I'm getting this error:
I've successfully added drogon.lib to the project linker input, but still getting the error above. If you know anything to help I would appreciate. Thanks in advance.
Did you open the project created by drogon_ctl as a CMake
project?
Hey @an-tao.. Yes, indeed I did. I've generated the project via cmake. I included from drogon source the function drogon_create_views
that was missing for projects that was generated without compiling source manually and have used vcpkg for example...
I will try to compile source generating with dependencies... but in the meanwhile I will try to continue use it with vcpkg generated lib and include files. The problem of unresolved symbol is very strange cause I included the drogon.lib in the linker option... Don't know why.. in my project manually I had the same unresolved symbol problem and I was able to solve including drogon.lib in "input" option of project in vsstudio.
Any ideas what could be wrong ? thanks in advance..
You don't need to manually add the Drogon library for linking. CMake will handle the project dependencies for you. Please refer to the relevant documentation on using CMake projects with MSVC. You can google keywords like cmake, msvc, vcpkg
to get more information.
After some tweaking in the project I was able to compile successfully. CMake didn't generate automatically for C++17, changed this and added manually the drogon lib solved the problem. And of course check compiled packages by vcpkg x64 or x86.
Thanks an-tao!
Describe the bug I create a project in VSSTUDIO 2022. Wrote the default code below.
To Reproduce Steps to reproduce the behavior:
vcpkg.exe install drogon
addListener
, guess it crashed on emplace_back the listener.Don't know if I played dumb and forgot to change or add something somewhere... sorry.
Desktop (please complete the following information):