Hi David, Great, thanks so much. I didn't know that there was this difference in MSVC 2005 (I first even failed by choosing the wrong abstractions such that the threads required Vista rather than Windows 2000 or better). I'll add the fix to the trunk as soon as possible and let you know.
Thanks Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: David Rijsman [mailto:david.rijs...@quintiq.com] Sent: Thursday, September 03, 2009 3:31 PM To: us...@gecode.org; Christian Schulte Subject: Re: [gecode-users] Version 3.x.x and Microsoft Visual C++ 2005Express Edition Hi Christian, I quote from msdn "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows. To compile an application that uses these functions, you must define the appropriate macros." The error we receive without the macro is: .\gecode/support/thread/windows.hpp(77) : error C3861: 'TryEnterCriticalSection': identifier not found Old versions of Windows (before NT 4.0) did not support the system call TryEnterCriticalSection on CriticalSection objects. A default Visual C++ build is compatible with old Windows releases, so it does not provide TryEnterCriticalSection. Defining _WIN32_WINNT to 0x0400 (or greater) solves this problem. David >>> From: "Christian Schulte" <cschu...@kth.se> To: "'David Rijsman'" <david.rijs...@quintiq.com>, <us...@gecode.org> Date: 9/3/2009 3:18 PM Subject: Re: [gecode-users] Version 3.x.x and Microsoft Visual C++ 2005Express Edition Hi David, Sure! I'll add that! Can you enlighten me what this magic incantation does? All the best Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of David Rijsman Sent: Thursday, September 03, 2009 3:03 PM To: us...@gecode.org Subject: [gecode-users] Version 3.x.x and Microsoft Visual C++ 2005 Express Edition Hi, I noticed that version 3.0.x no longer supports the Microsoft Visual C++ 2005 Express Edition and indeed the code does not compile using this compiler. Although the Microsoft Visual C++ 2008 Express Edition is free it is no option for me to use this one. I also noticed it is pretty easy to get the code compiling, running and passing al the tests again using the Microsoft Visual C++ 2005 Express Edition. All one has to do is change in "thread.hh" #ifdef GECODE_THREADS_WINDOWS #include <windows.h> #endif into #ifdef GECODE_THREADS_WINDOWS #ifndef _WIN32_WINNT # define _WIN32_WINNT 0x400 #endif #include <windows.h> #endif this works for 32 bits and 64 bits machine. Perhaps this can be added in the next releases? thanks, David J Rijsman Algorithm Lead Quintiq T +31 (0)73 691 07 39 F +31 (0)73 691 07 54 M +31 (0)62 127 68 29 E david.rijs...@quintiq.nl I www.quintiq.com _______________________________________________ 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