Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on Windows C++/WinRT #169

Closed
axojhf opened this issue Feb 18, 2023 · 5 comments
Closed

Build failure on Windows C++/WinRT #169

axojhf opened this issue Feb 18, 2023 · 5 comments

Comments

@axojhf
Copy link
Contributor

axojhf commented Feb 18, 2023

I tried to use glaze in my WinUI3 project, but I found that the compilation does not pass, while I tested in a normal C++ project that it can compile and run(The C++ version of both projects is set to c++20). I'm new to C++ and I don't know how to deal with this problem

Error Output

2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2589: '(': illegal token on right side of '::' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2062: type 'unknown-type' unexpected (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,41): error C2789: 'glz::frozen::bits::seed_or_index::MINUS_ONE': an object of const-qualified type must be initialized (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,31): message : see declaration of 'glz::frozen::bits::seed_or_index::MINUS_ONE' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2059: syntax error: ')' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,42): error C2131: expression did not evaluate to a constant (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,44): message : failure was caused by a read of an uninitialized symbol (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,44): message : see usage of 'MINUS_ONE' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2589: '(': illegal token on right side of '::' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C[276](https://github.com/axojhf/GlazeTestWinRT/actions/runs/4211692824/jobs/7310203467#step:5:277)0: syntax error: ')' was unexpected here; expected 'expression' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2760: syntax error: ')' was unexpected here; expected ';' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C3878: syntax error: unexpected token ')' following 'expression_statement' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') >' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') ) ?' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') :' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') )' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): warning C4003: not enough arguments for function-like macro invocation 'min' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(75,35): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): error C2059: syntax error: ')' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,5): message : see reference to class template instantiation 'glz::frozen::linear_congruential_engine<UIntType,a,c,m>' being compiled (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,1): error C2334: unexpected token(s) preceding ':'; skipping apparent function body (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2143: syntax error: missing ')' before ';' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2059: syntax error: ')' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2238: unexpected token(s) preceding ';' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): fatal  error C1201: unable to continue after syntax error in class template definition (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         module.g.cpp
         XamlTypeInfo.Impl.g.cpp
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2589: '(': illegal token on right side of '::' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2062: type 'unknown-type' unexpected (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,41): error C[278](https://github.com/axojhf/GlazeTestWinRT/actions/runs/4211692824/jobs/7310203467#step:5:279)9: 'glz::frozen::bits::seed_or_index::MINUS_ONE': an object of const-qualified type must be initialized (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,31): message : see declaration of 'glz::frozen::bits::seed_or_index::MINUS_ONE' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2059: syntax error: ')' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,42): error C2131: expression did not evaluate to a constant (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,44): message : failure was caused by a read of an uninitialized symbol (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,44): message : see usage of 'MINUS_ONE' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2589: '(': illegal token on right side of '::' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2760: syntax error: ')' was unexpected here; expected 'expression' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2760: syntax error: ')' was unexpected here; expected ';' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C3878: syntax error: unexpected token ')' following 'expression_statement' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') >' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') ) ?' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') :' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): message : error recovery skipped: ') )' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): warning C4003: not enough arguments for function-like macro invocation 'min' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(75,35): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): error C2059: syntax error: ')' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
       D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,5): message : see reference to class template instantiation 'glz::frozen::linear_congruential_engine<UIntType,a,c,m>' being compiled (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,1): error C2[334](https://github.com/axojhf/GlazeTestWinRT/actions/runs/4211692824/jobs/7310203467#step:5:335): unexpected token(s) preceding ':'; skipping apparent function body (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2143: syntax error: missing ')' before ';' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2059: syntax error: ')' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2238: unexpected token(s) preceding ';' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): fatal  error C1201: unable to continue after syntax error in class template definition (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
     2>Done Building Project "D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj" (default targets) -- FAILED.
     1>Done Building Project "D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.sln" (default targets) -- FAILED.

Build FAILED.

       "D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.sln" (default target) (1) ->
       "D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj" (default target) (2) ->
       (ClCompile target) -> 
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): warning C4003: not enough arguments for function-like macro invocation 'min' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(75,35): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): warning C4003: not enough arguments for function-like macro invocation 'min' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(75,35): warning C4003: not enough arguments for function-like macro invocation 'max' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]


       "D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.sln" (default target) (1) ->
       "D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj" (default target) (2) ->
       (ClCompile target) -> 
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2589: '(': illegal token on right side of '::' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2062: type 'unknown-type' unexpected (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,41): error C2789: 'glz::frozen::bits::seed_or_index::MINUS_ONE': an object of const-qualified type must be initialized (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2059: syntax error: ')' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,42): error C2131: expression did not evaluate to a constant (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2589: '(': illegal token on right side of '::' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2760: syntax error: ')' was unexpected here; expected 'expression' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2760: syntax error: ')' was unexpected here; expected ';' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C3878: syntax error: unexpected token ')' following 'expression_statement' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): error C2059: syntax error: ')' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,1): error C2334: unexpected token(s) preceding ':'; skipping apparent function body (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2143: syntax error: missing ')' before ';' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2059: syntax error: ')' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2238: unexpected token(s) preceding ';' (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): fatal  error C1201: unable to continue after syntax error in class template definition (compiling source file MainWindow.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2589: '(': illegal token on right side of '::' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2062: type 'unknown-type' unexpected (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,41): error C2789: 'glz::frozen::bits::seed_or_index::MINUS_ONE': an object of const-qualified type must be initialized (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(136,76): error C2059: syntax error: ')' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(137,42): error C2131: expression did not evaluate to a constant (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2589: '(': illegal token on right side of '::' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2760: syntax error: ')' was unexpected here; expected 'expression' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C2760: syntax error: ')' was unexpected here; expected ';' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\bits\pmh.hpp(193,68): error C3878: syntax error: unexpected token ')' following 'expression_statement' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,35): error C2059: syntax error: ')' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(74,1): error C2334: unexpected token(s) preceding ':'; skipping apparent function body (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2143: syntax error: missing ')' before ';' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2059: syntax error: ')' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): error C2238: unexpected token(s) preceding ';' (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]
         D:\a\GlazeTestWinRT\GlazeTestWinRT\thirdparts\glaze\frozen\random.hpp(87,4): fatal  error C1201: unable to continue after syntax error in class template definition (compiling source file App.xaml.cpp) [D:\a\GlazeTestWinRT\GlazeTestWinRT\GlazeTestWinRT.vcxproj]

    8 Warning(s)
    30 Error(s)
@axojhf
Copy link
Contributor Author

axojhf commented Feb 18, 2023

Oh, I found a similar problem on Stack Overflow, could you please fix it?
https://stackoverflow.com/a/13566433/21216472

@mwalcott3
Copy link
Collaborator

Yeah it's looking like someone is bringing in the windows headers without defining NOMINMAX. This is a pretty well known issue with the windows headers.This wouldn't have been a problem if windows followed standard naming conventions for macros. I believe anywhere we bring in windows headers we define NOMINMAX so it's probably another include you are using.

Not technically any issue with glaze itself but I think the wrapping the function name like you linked to is probably a good idea since this is such a common issue. You can try defining NOMINMAX at the top off the file that's having problems compiling in the meantime.

@axojhf
Copy link
Contributor Author

axojhf commented Feb 19, 2023

Yeah it's looking like someone is bringing in the windows headers without defining NOMINMAX. This is a pretty well known issue with the windows headers.This wouldn't have been a problem if windows followed standard naming conventions for macros. I believe anywhere we bring in windows headers we define NOMINMAX so it's probably another include you are using.

Not technically any issue with glaze itself but I think the wrapping the function name like you linked to is probably a good idea since this is such a common issue. You can try defining NOMINMAX at the top off the file that's having problems compiling in the meantime.

I don't know if defining NOMINMAX will have a chain reaction in Windows programming, I tried fork and modified it in the form of this (std::numeric_limits<int>::max)()
and changed the names of these two functions

static constexpr result_type min() { return increment == 0u ? 1u : 0u; }
static constexpr result_type max() { return modulus - 1u; }

Here is the part I forked and modified
axojhf@3836b2c
I was wondering if you had a chance to review my code changes and if you think they could be incorporated into the project.

@mwalcott3
Copy link
Collaborator

mwalcott3 commented Feb 19, 2023

Here is the part I forked and modified axojhf@3836b2c I was wondering if you had a chance to review my code changes and if you think they could be incorporated into the project.

@axojhf, the changes look good to me. If you make a pull request I'll merge it in.

@mwalcott3
Copy link
Collaborator

@axojhf I ended up merging your changes in #172. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants