Hi Filip, definitely nope ;-) Thanks for telling, that's useful. Is that commonly known (this is one of the ugliest things I saw in a while...)?
Cheers Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Filip Konvicka Sent: Thursday, July 30, 2009 12:39 PM To: us...@gecode.org Subject: Re: [gecode-users] help--trouble on using Gecode in VS2008 Hi, you might not be aware of the NOMINMAX macro, which can be #defined before #including windows.h (maybe a good place to do it is in the project settings, or on the compiler command line). This prevents windows.h defining the min and max macros. HTH, Filip > Hi, > > > > I know that problem: unfortunately the windows headers you include > define the macros min and max (which is a bug in the windows headers). > What you should do is after including the windows headers files, add the > following: > > > > #ifdef min > > #undef min > > #endif > > > > #ifdef max > > #undef max > > #endif > > > > As you don’t tell us which version of Gecode you use (one should ALWAYS > do that) I can only suggest to have a look at gecode/support/thread.hh > in the latest version of Gecode (3.1.0). There at the very end you’ll > find that fix. > > > > Cheers > > Christian > > > > > > *From:* users-boun...@gecode.org > [mailto:users-boun...@gecode.org] *On > Behalf Of *Sir Yao > *Sent:* Tuesday, July 28, 2009 10:43 AM > *To:* us...@gecode.org > *Subject:* [gecode-users] help--trouble on using Gecode in VS2008 > > > > hello all, > > As a beginner using Gecode, i faced a problem. i want you do > me a favor. > > My tools are VS2008, and i can succeed to compile and run > examples which are supplied by Gecode on VS2008 . These are all Win32 > console application. But when i develop a MFC application using Gecode, > there have many errors facing to me. Even i simply replanted one example > of Gecode ,for instance TSP, to MFC . Errors as follows: > > " > > d:\program files\gecode\include\gecode\iter\ranges-operations.hpp(94) : > warning C4003: not enough actual parameters for macro 'max' > d:\program files\gecode\include\gecode\iter\ranges-operations.hpp(94) : > warning C4003: not enough actual parameters for macro 'max' > d:\program files\gecode\include\gecode\iter\ranges-operations.hpp(109) : > warning C4003: not enough actual parameters for macro 'max' > d:\program files\gecode\include\gecode\iter\ranges-operations.hpp(109) : > warning C4003: not enough actual parameters for macro 'min' > > …… > > d:\program files\gecode\include\gecode\iter\ranges-minmax.hpp(79) : > error C2062: type 'void' unexpected > > d:\program files\gecode\include\gecode\iter\ranges-minmax.hpp(77) : > error C2062: type 'void' unexpected > > " > > > > I foud places where make into mistakes are > > " return std::numeric_limits<size_type>::max() / " > > " int min(void) const; " > > > > I make sure that configures in the properties dialog of my > solution are set successfully. I have a suspicion that perhaps it need > some library for using Gecode in MFC. I found "The Gecode Interactive > Search Tool (Gist) is a graphical search engine for Gecode, built on top > of the Qt GUI toolkit <http://trolltech.com/products/qt>." in the manual > of Gecode. Does it have some relations with my trouble? who know the > reason ? > > Thanks for all the people who look at my email. > > > > kayler > > > ------------------------------------------------------------------------ > > _______________________________________________ > Gecode users mailing list > us...@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users