I have been trying to create the necessary borland makefiles using CMake for embarcadero C++ builder. Till now I only succeeded in adding OpenCV 2.4.13 but that version is way too old so I want to try again and add OpenCV 4.8.0 to Embarcadero. The problem is that when it finishes the make install command I find out that the opencv_core480.lib file a size has of 2 kb which is way too small. I used the following CMake command:
cmake -DCMAKE_C_COMPILER=bcc32x.exe -DCMAKE_CXX_COMPILER=bcc32x.exe -DCMAKE_CXX_FLAGS=“-Wno-c++11-narrowing” -G"Borland Makefiles" -DCMAKE_BUILD_TYPE=Debug -DBUILD_PERF_TESTS=OFF -DWITH_WEBP=OFF -DWITH_OPENEXR=OFF -DWITH_TIFF=OFF -DBUILD_TIFF=OFF -DBUILD_TESTS=OFF -DWITH_JASPER=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_PROTOBUF=OFF -DBUILD_opencv_dnn=OFF -DBUILD_IPP=OFF -DWITH_IPP=OFF -DWITH_ADE=OFF -DBUILD_opencv_apps=OFF -DOPENCV_ENABLE_NONFREE=ON C:/openCV/opencv-4.8.0
While running the make install command there were a few errors along the way which I tried to solve by either adding something or commenting it out so that it could run:
When I got the error error: token is not a valid binary operator in a preprocessor subexpression:
#if (i64_fromNaN != i64_fromPosOverflow) || (i64_fromNaN != i64_fromNegOverflow)
if ((exp == 0x7FF) && sig) {
#if (i64_fromNaN == i64_fromPosOverflow)
sign = 0;
#elif (i64_fromNaN == i64_fromNegOverflow)
sign = 1;
#else
raiseFlags(flag_invalid);
return i64_fromNaN;
#endif
}
#endif
to:
//#if (i64_fromNaN != i64_fromPosOverflow) || (i64_fromNaN != i64_fromNegOverflow)
if ((exp == 0x7FF) && sig) {
//#if (i64_fromNaN == i64_fromPosOverflow)
sign = 0;
//#elif (i64_fromNaN == i64_fromNegOverflow)
sign = 1;
//#else
raiseFlags(flag_invalid);
return i64_fromNaN;
//#endif
}
//#endif
Other changes were:
error: use of undeclared identifier ‘uintptr_t’ = add #include in …\opencv-4.7.0\3rdparty\ittnotify\include\ittnotify.h
error: use of undeclared identifier ‘lrintf’ = add #include <math.h> in …/opencv-4.7.0/modules/core/include\opencv2/core/fast_math.hpp
error: unknown type name ‘FILE’ = add #include <stdio.h> in …/opencv-4.7.0/modules/core/include\opencv2/core/operations.hpp
error: use of undeclared identifier ‘llvm’ = comment it out and make it return value; instead in …/opencv-4.7.0/modules/core/include\opencv2/core/hal/intrin.hpp
Is the opencv_core480.lib empty because of the changes I made or is it because something goes wrong when using CMake.