Unfortunate include of 'windows.h' in operations.hpp (Bug #2122)
Description
Hi there,
we just migrated our projects to the new OpenCV 2.4.1 but encountered many problems concerning include hierarchies since "windows.h" is now ALWAYS included by default through the "core/operations.hpp" header which itself is included by "core/core.hpp".
This is quite a disadvantage of the new opencv version since it messes up all/many projects that also have to include "windows.h" or ATL headers.
Looking into the old "operations.hpp" file I can find this code block:
#elif defined WIN32 || defined _WIN32 #include <intrin.h> #define CV_XADD(addr,delta) _InterlockedExchangeAdd((long volatile*)(addr), (delta)) #else
whereas the new "operations.hpp" shows this code:
#elif defined WIN32 || defined _WIN32 #define WIN32_MEAN_AND_LEAN #ifndef _WIN32_WINNT // This is needed for the declaration of TryEnterCriticalSection in winbase.h with Visual Studio 2005 (and older?) #define _WIN32_WINNT 0x0400 // http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx #endif #include <windows.h> #undef min #undef max #undef abs #define CV_XADD(addr,delta) InterlockedExchangeAdd((long volatile*)(addr), (delta)) #else
Wouldn't it be possible to get the main header files of OpenCV "windows-h"-free again? This would be great!
Regards
Matthias
Associated revisions
made opencv headers windows.h-less (Bug #2122)
Merge pull request #2122 from adishavit:feature-HandleMouseWheel
History
Updated by Andrey Kamaev over 12 years ago
- Category set to core
Updated by Alexander Smorkalov over 12 years ago
- Assignee set to Vadim Pisarevsky
- Target version set to 2.4.3
Updated by Vadim Pisarevsky over 12 years ago
- Target version deleted (
2.4.3)
Updated by Andrey Kamaev about 12 years ago
- Target version set to 2.4.3