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

**URL:** https://discourse.cmake.org/t/empty-opencv-core-lib-after-running-cmake-for-embarcadero-c-builder-10-3/8472
**Category:** Usage
**Created:** [July 6, 2023, 2:46pm UTC](https://discourse.cmake.org/t/empty-opencv-core-lib-after-running-cmake-for-embarcadero-c-builder-10-3/8472 "2023-07-06T14:46:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![XanderTest-OK](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/x/db5fbb/32.png) [@XanderTest-OK](https://discourse.cmake.org/u/XanderTest-OK)
#### Post date: [July 6, 2023, 2:46pm UTC](https://discourse.cmake.org/t/empty-opencv-core-lib-after-running-cmake-for-embarcadero-c-builder-10-3/8472/1 "2023-07-06T14:46:37Z")

</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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [July 9, 2023, 4:41pm UTC](https://discourse.cmake.org/t/empty-opencv-core-lib-after-running-cmake-for-embarcadero-c-builder-10-3/8472/2 "2023-07-09T16:41:41Z")

</div>

This sounds like a question for OpenCV upstream.
