# Empty opencv\_core.lib file after running CMake for Embarcadero C++ Builder 10.3

**URL:** https://forum.opencv.org/t/empty-opencv-core-lib-file-after-running-cmake-for-embarcadero-c-builder-10-3/13776
**Category:** Uncategorized
**Tags:** build, cmake, embarcadero, borland
**Created:** [July 6, 2023, 2:45pm UTC](https://forum.opencv.org/t/empty-opencv-core-lib-file-after-running-cmake-for-embarcadero-c-builder-10-3/13776 "2023-07-06T14:45:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Xander-Vreeswijk](https://avatars.discourse-cdn.com/v4/letter/x/b487fb/32.png) [@Xander-Vreeswijk](https://forum.opencv.org/u/Xander-Vreeswijk)
#### Post date: [July 6, 2023, 2:45pm UTC](https://forum.opencv.org/t/empty-opencv-core-lib-file-after-running-cmake-for-embarcadero-c-builder-10-3/13776/1 "2023-07-06T14:45:21Z")

</div>

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.
