Opened 10 years ago
Closed 10 years ago
#9611 closed Patch - Bug Fix (Fixed)
commit 89f4e32 (changes for MSVC) breaks the Windows build
Reported by: | Owned by: | dblain | |
---|---|---|---|
Priority: | critical | Milestone: | 0.25 |
Component: | Ports - Windows | Version: | Master Head |
Severity: | medium | Keywords: | Windows std::min |
Cc: | Ticket locked: | no |
Description
https://github.com/MythTV/mythtv/commit/89f4e32fe89d39d230ae9143b29194f1a0325c49 removes the namespace qualifier from std::min in mythrender_d3d9.cpp which breaks the Windows build with Mingw.
The attached patch includes <algorithm>, which defines std::min, and allows mythrender_d3d9.cpp to compile for both gcc and msvc.
NN this error indicate that the Windows builds should be defining WIN32_LEAN_AND_MEAN and NOMINMAX before #including <windows.h>. The min and max macros defined in windows.h are dangerous when mixed with C++ STL and should be removed. The gcc C++ headers such as <iterator> specifically undef min & max to avoid these problems.
P.S. Please could David Blain test his Windows changes with the Windows packager or mythbuild.sh script before committing Windows specific changes. Thanks.
Attachments (1)
Change History (4)
Changed 10 years ago by
Attachment: | 11-d3d9-min.diff added |
---|
comment:1 Changed 10 years ago by
Milestone: | unknown → 0.25 |
---|---|
Owner: | changed from Nigel to dblain |
Priority: | minor → critical |
Status: | new → assigned |
comment:2 Changed 10 years ago by
Summary: | [PATHCH] commit 89f4e32 (changes for MSVC) breaks the Windows build → commit 89f4e32 (changes for MSVC) breaks the Windows build |
---|
comment:3 Changed 10 years ago by
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
Fixed in https://github.com/MythTV/mythtv/commit/f3bf7b6a4e3bd6f21247faa5f368697939e1056d