drogon icon indicating copy to clipboard operation
drogon copied to clipboard

Dynamic Loading of Views don't work on Windows

Open EXQ364 opened this issue 3 years ago • 3 comments
trafficstars

Hi. I can't get the behavior of dynamic views to work. The following has been done:

  1. In the CMake file, I have commented out the line "set_property(TARGET ${PROJECT_NAME} PROPERTY ENABLE_EXPORTS ON)"
  2. In the configuration file the following parameters are set
"load_dynamic_views": true ,
"dynamic_views_path": [
            "../views"
        ],
"dynamic_views_output_path": "../views/build",

The project was created with the utility "drogon_ctl". The views work, but they don't compile dynamically, i.e. I need to rebuild the project to see the changes. I found that the views are compiled in the folder with the project, and not in the path prescribed in the configuration file ie work statically, although the documentation says that they should be built dynamically. What I do wrong?

  • OS:Windows 11
  • Drogon was obtained via vcpkg install drogon:x64-windows

EXQ364 avatar Jun 24 '22 11:06 EXQ364

Dynamic views are not supported on Windows. https://github.com/drogonframework/drogon/blob/46c00a317f169369d416c1a4705bd561ef163d45/lib/src/HttpAppFrameworkImpl.cc#L530-L537

an-tao avatar Jun 24 '22 14:06 an-tao

Dynamic views are not supported on Windows.

https://github.com/drogonframework/drogon/blob/46c00a317f169369d416c1a4705bd561ef163d45/lib/src/HttpAppFrameworkImpl.cc#L530-L537 Thanks for the answer. Could you explain why this mechanism is not possible in windows? Just for my interest.

EXQ364 avatar Jun 24 '22 17:06 EXQ364

Dynamic views are not supported on Windows. https://github.com/drogonframework/drogon/blob/46c00a317f169369d416c1a4705bd561ef163d45/lib/src/HttpAppFrameworkImpl.cc#L530-L537

Thanks for the answer. Could you explain why this mechanism is not possible in windows? Just for my interest.

I'm not familiar with dynamic libraries loading and reloading on Windows. you could make a PR for this if you like.

an-tao avatar Jun 25 '22 02:06 an-tao