Closed albaropereyra22 closed 1 year ago
Check your config.json. This is expected.
Could you check the string with file name. In C++ it should be: "C:\\Users\\dell\\your_project_name\\config.json" ( not "C:\Users\dell\your_project_name\config.json" as in your example)
Yesterday I did similar mistake despite 30+ years experience with C and C++. P.S. probably it is Github converted your code , and you have correct backslashes in your program
It is hard to believe, that problem in Windows can be with jsoncpp.dll file. If you ran debug code, but jsoncpp.dll in current folder or first in PATH is release version (or vice versa), json function silently fail (like file does not exists) and your program continue to work without configuration. Cmake configuration file configured to copy this file to build folder on every build. If it is copied wrong every time, you will have problems every run of the program during debug. I have jsoncpp in vcpkg, and debug folder (installed/x64-windows/debug/bin) put in first place before release versions of dll.
Check it. Build you program, copy debug version of jsoncpp.dll to Debug folder to exe file, run program.
I figured it out. I had to comment out the default simple controller mapping. ex: //"simple_controllers_map": [ // { // "path": "C:\Users\dell\your_project_name\", // "controller": "TestCtrl", // "http_methods": [ // "get", // "post" // ], // "filters": [ // "FilterClassName" // ] // } //],
now I am having problems mapping TestCtrl but, that is a seperate issue.
Thanks for your help and yes I am using double dashes \.
Describe the bug Once I point to what I think is the correct way to point to the default config.json file I get the following error on Windows.
To Reproduce Steps to reproduce the behavior:
Expected behavior Run with no errors Screenshots
Desktop (please complete the following information):