Thank you to everybody for your responses! Defining NOMINMAX works great.

BTW, setting WIN32_LEAN_AND_MEAN or VC_EXTRALEAN doesn't fix the problem, as neither defines NOMINMAX, nor prevents the inclusion of WinDef.h (the header where min and max are defined).

:) Michael

On Tue, Jan 4, 2011 at 8:47 AM, Wheeler, Frederick W (GE Global Research) <wheeler@ge.com> wrote:

Here is a KB article about LEAN_AND_MEAN

http://support.microsoft.com/kb/166474


> -----Original Message-----
> From: Wheeler, Frederick W (GE Global Research)
> Sent: Tuesday, January 04, 2011 8:45 AM
> To: Gehua Yang; Roddy Collins
> Cc: Vxl-Users
> Subject: Re: [Vxl-users] conflict between VXL and windows.h
>
> There are few other macros like VC_EXTRALEAN and
> WIN32_LEAN_AND_MEAN that when set limit what is #defined and declared
> by windows.h.  WIN32_LEAN_AND_MEAN is used in a few places in vcl.  It is
> possible that you are getting WIN32_LEAN_AND_MEAN defined when you
> include vil/vil_convert.h.  Might be easier to simply #define
> WIN32_LEAN_AND_MEAN before including windows.h.
>
> -Fred
>
> > -----Original Message-----
> > From: Gehua Yang [mailto:yanggehua@gmail.com]
> > Sent: Monday, January 03, 2011 8:28 PM
> > To: Roddy Collins
> > Cc: Vxl-Users
> > Subject: Re: [Vxl-users] conflict between VXL and windows.h
> >
> > I confirmed the trick does work.
> >
> > Thank you for pointing it out, Roddy!
> >
> > Gehua.
> >
> >
> > On Mon, Jan 3, 2011 at 8:20 PM, Roddy Collins
> <roddy.collins@kitware.com>
> > wrote:
> > > On Mon, Jan 3, 2011 at 8:13 PM, Gehua Yang <yanggehua@gmail.com>
> > wrote:
> > >>
> > >> I got the same error / warning.  I ended up undefining min and max
> > >> right after each include of windows.h, which works well for me:
> > >>
> > >
> > > Just curious-- does setting NOMINMAX in the cmake compile flags work?
> > >
> > > e.g. http://www.quantlib.co.uk/blog/what-does-nominmax-do
> > >
> > > -Roddy
> > >
> >
> > ------------------------------------------------------------------------------
> > Learn how Oracle Real Application Clusters (RAC) One Node allows
> customers
> > to consolidate database storage, standardize their database environment,
> > and,
> > should the need arise, upgrade to a full multi-node Oracle RAC database
> > without downtime or disruption
> > http://p.sf.net/sfu/oracle-sfdevnl
> > _______________________________________________
> > Vxl-users mailing list
> > Vxl-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/vxl-users
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Vxl-users mailing list
> Vxl-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/vxl-users

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Vxl-users mailing list
Vxl-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vxl-users