I am building a C application that uses OpenCV.
when compiling, I get the following error:
fatal error C1189: #error : core.hpp header must be compiled as C++
I did not find how to resolve this error.
How to use OpenCV from a C project?
I am building a C application that uses OpenCV.
when compiling, I get the following error:
fatal error C1189: #error : core.hpp header must be compiled as C++
I did not find how to resolve this error.
How to use OpenCV from a C project?
I am not sure how much helpful will this be, but recently I faced with similar issue trying to compile the 'darknet' open source tool. The source includes a header files from OpenCV but needs to be compiled with C compiler and not with C++.
The codes were using the following headers and I have just changed the header names: instead of:
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
use the following:
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/imgproc/imgproc_c.h"