libunifex icon indicating copy to clipboard operation
libunifex copied to clipboard

Compile issue in Visual Studo 2019 16.11.7

Open zeyangl opened this issue 3 years ago • 2 comments

image cmake -G "Visual Studio 16 2019" and compile the ALL_BUILD target gives me the above error messages.

image Changing the highlighted constexpr to const appears to fix those errors.

zeyangl avatar Dec 12 '21 09:12 zeyangl

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.

zeyangl avatar Dec 12 '21 09:12 zeyangl

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!

AnujYamdagni avatar Jun 29 '22 20:06 AnujYamdagni