[mythtv-commits] Ticket #9611: [PATHCH] commit 89f4e32 (changes for MSVC) breaks the Windows build

MythTV noreply at mythtv.org
Thu Feb 24 10:25:08 UTC 2011


#9611: [PATHCH] commit 89f4e32 (changes for MSVC) breaks the Windows build
-------------------------------------------------+-------------------------
     Reporter:  Lawrence Rust <lvr@…>            |      Owner:  nigel
         Type:  Patch - Bug Fix                  |     Status:  new
     Priority:  minor                            |  Milestone:  unknown
    Component:  Ports - Windows                  |    Version:  Trunk Head
     Severity:  medium                           |   Keywords:  Windows
Ticket locked:  0                                |  std::min
-------------------------------------------------+-------------------------
 [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.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9611>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list