tfussell / xlnt

:bar_chart: Cross-platform user-friendly xlsx library for C++11+
Other
1.49k stars 418 forks source link

there are several compile errors when the windows.h is included with xlnt.h together. #456

Closed SummerZ2020 closed 4 years ago

SummerZ2020 commented 4 years ago

The xlnt.h is included in my code, and it can be compiled successfully. But there are many compilation errors when the windows.h is included before xlnt.h. Here are some errors from numeric.hpp. Severity Code Description Project File Line Suppression State Error C2061 syntax error: identifier 'lval' CopyFiles E:\ImageComprehension\Auto_Bone_Removal\BatchReadDicom\xlnt-master\build\installed\include\xlnt\utils\numeric.hpp 50 Severity Code Description Project File Line Suppression State Error C2365 'NumberL': redefinition; previous definition was 'template parameter' CopyFiles E:\ImageComprehension\Auto_Bone_Removal\BatchReadDicom\xlnt-master\build\installed\include\xlnt\utils\numeric.hpp 50 Severity Code Description Project File Line Suppression State Error C2146 syntax error: missing ';' before identifier 'rval' CopyFiles E:\ImageComprehension\Auto_Bone_Removal\BatchReadDicom\xlnt-master\build\installed\include\xlnt\utils\numeric.hpp 50 Severity Code Description Project File Line Suppression State Error C2447 '{': missing function header (old-style formal list?) CopyFiles E:\ImageComprehension\Auto_Bone_Removal\BatchReadDicom\xlnt-master\build\installed\include\xlnt\utils\numeric.hpp 51 I use vs2019 and win 10 in my laptop. And the windows SDK version is 10.0.18362.0 .

SummerZ2020 commented 4 years ago

After rename max and min function, the code is compiled successfully.