drogon
drogon copied to clipboard
Dynamic Loading of Views don't work on Windows
Hi. I can't get the behavior of dynamic views to work. The following has been done:
- In the CMake file, I have commented out the line
"set_property(TARGET ${PROJECT_NAME} PROPERTY ENABLE_EXPORTS ON)" - 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
Dynamic views are not supported on Windows. https://github.com/drogonframework/drogon/blob/46c00a317f169369d416c1a4705bd561ef163d45/lib/src/HttpAppFrameworkImpl.cc#L530-L537
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.
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.