-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Environment:
Windows 11
VS 2022 (latest)
MSVC 143 (latest)
EPICS Base 7.0.9
Modbus (latest)
We rarely build EPICS on Windows so I understand I might be missing something. I came up into building modbus and several other modules under Windows 11, everything built fine except modbus. I got compiler error C2589 on this line https://github.com/epics-modules/modbus/blob/master/modbusApp/src/drvModbusAsyn.cpp#L520 and several others, all the errors have to do with std::min. After research I came into this old thread https://stackoverflow.com/questions/5004858/why-is-stdmin-failing-when-windows-h-is-included and both these solutions work:
- Explicitly specify template data type, i.e.
std::min<int> - Use parenthesis
(std::min)to prevent the MSVC preprocessor from using its own min macros.
Let me know if this is OK so I can submit a PR! π
Metadata
Metadata
Assignees
Labels
No labels