OpenCV with_Openexr build errors (Bug #3259)
I get many build errors when compiling the latest OpenCV with openexr.
when I don't use with_openexr all is good!
Here is the error:
Error 156 error: "restrict" has already been declared in the current scope \3rdparty\openexr\Imath\ImathMatrix.h 2530 Error 158 error: "restrict" has already been declared in the current scope \3rdparty\openexr\Imath\ImathMatrix.h 2531 Error 155 error: expected a ";" \3rdparty\openexr\Imath\ImathMatrix.h 2529 Error 157 error: expected a ";" \3rdparty\openexr\Imath\ImathMatrix.h 2530 Error 159 error: expected a ";" \3rdparty\openexr\Imath\ImathMatrix.h 2531 Error 160 error: identifier "ap" is undefined \3rdparty\openexr\Imath\ImathMatrix.h 2535 Error 162 error: identifier "bp" is undefined \3rdparty\openexr\Imath\ImathMatrix.h 2540 Error 161 error: identifier "cp" is undefined \3rdparty\openexr\Imath\ImathMatrix.h 2540
I use Windows 7, VS 2008.
- Affected version changed from branch '2.4' to 2.4.6 (latest release)
- Status changed from New to Open
- Description changed from Hi, I get many build errors when compiling the latest OpenCV with openexr.... to Hi, I get many build errors when compiling the latest OpenCV with openexr.... More
I cannot reproduce build issue with Visual Studio 2008 and Visual Studio 2012. If you look at 3rdparty/openexr/Imath/ImathPlatform.h IMATH_RESTRICT macro is defined empty for MSVC. It means that you use some other compiler like Intel C++ compiler or you have some other version of OpenEXR lib in include path and compiler uses mix of headers from different locations. Unfortunately, I do not have ICC and cannot check compilation with it. I close the ticket.
- Status changed from Open to Cancelled
I was experiencing this same issue using the ICC compiler. Reassigning the IMATH_RESTRICT macro from "restrict" to empty fixes the issue.
There are also a overwhelming number of warnings for signed/unsigned integer comparisons.
- Status changed from Cancelled to Incomplete