Collision with Apple assert macros in imgproc.hpp (Bug #1377)
Description
On Mac OS X (tested on 10.6), there exists a header file called AssertMacros.h that defines several "common" words (e.g. check, verify, require; a full list can be found here) as macros for debugging purposes. It is found in Kernel.framework and is used at least by CoreServices.framework.
OpenCV's imgproc module declares a method called 'check' in class Subdiv2D on line 1082 in imgproc.hpp, which naturally collides with the macro definition. As a result, any program using OpenCV's imgproc.hpp and some of Apple's frameworks won't compile.
It probably is/was a very bad idea by Apple to use such common words for those macros, but there probably is little one can do about that. My current fix for this issue is to put an
#undef check
at the beginning of imgproc.hpp. I found the same fix in ml.hpp, so this issue does not seem to be completely unknown.
History
Updated by Vadim Pisarevsky over 13 years ago
fixed in trunk, r6783 (check() => checkSubdiv())
- Status changed from Open to Done
- (deleted custom field) set to fixed
Updated by Andrey Kamaev almost 13 years ago
- Target version set to 2.4.0