You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System / Platform => linux Ubuntu 16.04 64 Bit
Compiler => gcc
Detailed description
I have recently installed opencv 3.2 in ubuntu 16.04 system and tried to run a C code using opencv library. The code is not compiling because of the following issue:
/tmp/ccwgquWQ.o: In function `cvPointFrom32f':
try.c:(.text+0x54d): undefined reference to `cvRound'
try.c:(.text+0x563): undefined reference to `cvRound'
/tmp/ccwgquWQ.o: In function `cvReadInt':
try.c:(.text+0xe68): undefined reference to `cvRound'
/tmp/ccwgquWQ.o: In function `cvEllipseBox':
try.c:(.text+0x10d4): undefined reference to `cvRound'
try.c:(.text+0x10f6): undefined reference to `cvRound'
collect2: error: ld returned 1 exit status
I have asked a question related to this in stackoverflow and I got the response saying that, its a bug present in opencv3.2. [http://stackoverflow.com/questions/42918747/yolo-c-compilation-failure-with-debug-1]
The reason for calling it as a bug is as follows:
CvRound function has bee defines in types_c.h in opencv2 whereas in opencv3 its not been defined in types_c.h but in core/fast_math.hpp. Despite being not defined in types_c.h its still being called in types_c.h, core_c.h and imgproc_c.h without any reference to fast_math.hpp
I have tried including the "fast_math.hpp" path (#include core/fast_math.hpp) in types_c.h, core_c.h and imgproc_c.h but it didn't solve the issue.
Kindly, look into this issue and get it resolved as early as possible
The text was updated successfully, but these errors were encountered:
praneethsusarla
changed the title
Hi, I have installed opencv 3.2.0 in ubuntu 16.04 system and when I run a C code with opencv.. It throws me out the following error
Undefined reference to cvRound in opencv 3.2
Mar 23, 2017
OpenCV is C++ library. There is no support for direct C compilation, it doesn't work (crash sometimes, see cvGetSize (#6221) problem). Also OpenCV C API is candidate for removal.
You should compile your program as C++ to use OpenCV.
System information (version)
Detailed description
I have recently installed opencv 3.2 in ubuntu 16.04 system and tried to run a C code using opencv library. The code is not compiling because of the following issue:
I have asked a question related to this in stackoverflow and I got the response saying that, its a bug present in opencv3.2. [http://stackoverflow.com/questions/42918747/yolo-c-compilation-failure-with-debug-1]
The reason for calling it as a bug is as follows:
CvRound function has bee defines in types_c.h in opencv2 whereas in opencv3 its not been defined in types_c.h but in core/fast_math.hpp. Despite being not defined in types_c.h its still being called in types_c.h, core_c.h and imgproc_c.h without any reference to fast_math.hpp
I have tried including the "fast_math.hpp" path (#include core/fast_math.hpp) in types_c.h, core_c.h and imgproc_c.h but it didn't solve the issue.
Kindly, look into this issue and get it resolved as early as possible
The text was updated successfully, but these errors were encountered: