drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.62k stars 1.12k forks source link

Is there a example of the usage of the function enableDynamicViewsLoading? #1079

Closed ACCodelover closed 3 years ago

ACCodelover commented 3 years ago

Describe the bug I follow the guide from offical document(https://drogon.docsforge.com/master/view/#dynamic-compilation-and-loading-of-views) about the usage of enableDynamicViewsLoading but it seems that it doesn't work well.Should I put the csp file that needs to be dymaticly loaded outside the project path or what?Acutally maybe I don't understand the guide very well. Because I am completely new to this framework, so there maybe some basic even rediculous error I have made.Please forgive me!Thanks for you attention.

Here is what I got when I run the app

[coder@coder-M1S build]$ sudo ./drogon_test create view:/home/coder/Templates/ListParameters.csp create HttpView Class file by /home/coder/Templates/ListParameters.csp className=ListParameters ./drogon_test: symbol lookup error: /home/coder/Templates/ListParameters.so: undefined symbol: _ZN6drogon10DrClassMap13registerClassERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt8functionIFPNS_12DrObjectBaseEvEE

Desktop (please complete the following information):

starfisher commented 1 year ago

你好最终解决了么?