兩次opencv工程需要設置為C++編譯:找了一半天的解決方法。
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?
- Select the required file.
- Launch its properties window
- Goto C/C++ -> Advanced, and change Compile as to Compile as C++ Code (/TP)