libunifex
libunifex copied to clipboard
Compile issue in Visual Studo 2019 16.11.7
cmake -G "Visual Studio 16 2019" and compile the ALL_BUILD target gives me the above error messages.
Changing the highlighted constexpr to const appears to fix those errors.
This appears to be a quirk in visual studio and the correct behavior requires an addtional flag. https://developercommunity.visualstudio.com/t/constexpr-definition-of-extern-const-variable/121763
Adding /Zc:externConstexpr to execute and execute_test projects would also fix this issue.
Thanks for flagging this bug with a suggested fix @zeyangl. We're planning on investing more time into maintaining this library, and we've filed a task to address this bug to our backlog. In the meantime, feel free to put up a PR for this!