IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    NOMINMAX引起的stl gdi冲突,

    Enic发表于 2015-05-18 03:55:00
    love 0

    If you define NOMINMAX, because you prefer the STL version, then you may get problems while including gdiplus.h, which uses the min/max macro. As solution you need to include the STL headers and use "using namespace std" before you include the gdiplus.h.

    In example:

    #define NOMINMAX 
    // Include C++ headers
    #include
    using namespace std;

    // Include Windows headers
    #include
    #include

    不能直接在工程中添加NOMINMAX,必须这么处理才能OK


    Enic 2015-05-18 11:55 发表评论


沪ICP备19023445号-2号
友情链接