I'm trying to port OpenCV to C++ Builder (XE3 version).
I've encountered many compiler errors.
As I know, BCC 32-bit is not a clang complaint compiler, and does not follow C++11 standards. This is why I have met with so many issues.
I tried to resolve parts of these issues one by one with workarounds. However, I cannot resolve the following one. Can someone help me about this?
p.s. I know it is an issue with BCC32, as this code can be compiled successfully with Visual Studio, or even BCC64 compiler.
The following code is extracted from ImfBoxAttribute.cpp (in opencv 2.4.11\sources\3rdparty\openexr\IlmImf)
template <>
void
Box2iAttribute::writeValueTo (OStream &os, int) const
{
Xdr::write <StreamIO> (os, _value.min.x);
Xdr::write <StreamIO> (os, _value.min.y);
Xdr::write <StreamIO> (os, _value.max.x);
Xdr::write <StreamIO> (os, _value.max.y);
}
When I compile with C++ Builder XE3 32bit, I meet with the following compiler errors:
[bcc32 Error] ImfBoxAttribute.cpp(61): E2171 Body has already been defined for function 'Box2iAttribute::writeValueTo(OStream &,int) const'
and
[bcc32 Error] ImfBoxAttribute.cpp(62): E2451 Undefined symbol 'os'
Full parser context
ImfBoxAttribute.cpp(47): namespace Imf
ImfBoxAttribute.cpp(61): parsing: void Box2iAttribute::writeValueTo(OStream &,int) const
Here is the definition of Box2iAttribute:
typedef TypedAttribute<Imath::Box2i> Box2iAttribute;
typedef Box <V2i> Box2i;