[MacPorts] #30693: opencv @2.2.0_1 build fails
MacPorts
noreply at macports.org
Thu Sep 1 08:10:28 PDT 2011
#30693: opencv @2.2.0_1 build fails
------------------------------+---------------------------------------------
Reporter: saskathex@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.1
Keywords: lion | Port: opencv
------------------------------+---------------------------------------------
Comment(by balazs.vagvolgyi@…):
The issue seems to be an interference with the default `MIN(a,b)` macro in
one of the OS X frameworks.
Got it working by modifying the following files:
OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp
OpenCV-2.2.0/modules/core/include/opencv2/core/operations.hpp
The modification involved creating another `MIN` macro in both files, I
called it `__MIN(a,b)`:
`#define __MIN(a,b) ((a)<(b)?(a):(b))`
and replacing all `MIN(...)` calls with `__MIN(...)`.
After the changes opencv compiles without errors.
--
Ticket URL: <https://trac.macports.org/ticket/30693#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list