OpenCV Source with Embarcadero 10.x C++ Compiler

asked 2020-02-06 12:45:38 -0500

JWilliams gravatar image

Hello all,

I am hoping someone out there has some answers about how to get the OpenCV (any version) to compile from source code in Embarcadero's C++ Compiler. At the moment I have tried 2.4.x, 3.4.x and now 4.2.0 with on success at all. I keep getting stuck about 70% of the way when compiling the core/makefile. The current issue has to do with IMPLEMENT_REFCOUNTABLE in file ocl.cpp line 1156 column 5 with error "error: expected member name or ';' after declaration specifiers IMPLEMENT_REFCOUNTABLE();.

Does anyone have any ideas, or links to someone successfully compiling from source in C++ Builder?


edit retag flag offensive close merge delete


IMPLEMENT_REFCOUNTABLE() is a macro defined in ocl.hpp, so you could expand in that position to make it easier to see what part of the macro fails.

mvuori gravatar imagemvuori ( 2020-02-06 15:08:50 -0500 )edit

I drilled into that and found the issue to be with the _Atomic pointer cast from CV_XADD. This of course becomes an Embarcadero C++ Cuilder issue, but not sure why since i can copy the same macros into a new Builder project and dont have a issue. I did set up CMake to use bccbc.exe clang compiler in builder. I am hoping that somebody over the years has come up with a way to get this going in it.

JWilliams gravatar imageJWilliams ( 2020-02-06 15:50:50 -0500 )edit