Ask Your Question

Revision history [back]

OpenCV Compilation/Linking Errors in async.hpp, version.hpp, dict.hpp, etc. when #include <opencv2 dnn.hpp=""> and <opencv2 opencv.hpp="">

I installed OpenCV[dnn] 64-bit and jsoncpp using vcpkg. I can successfully use jsoncpp in my project and ./vcpkg list successfully lists 9 OpenCV packages including dnn.

I also have both of the include statements listed in the title, in my Visual Studio project. Yet I still get errors in files on compilation such as: Severity Code Description Project File Line Suppression State Suppression State Error C3646 'CV_NOEXCEPT': unknown override specifier (compiling source file src\main.cpp) Rocket League Inventory Extractor C:\Dev\vcpkg\installed\x64-windows\include\opencv2\core\async.hpp 34 Error C2143 syntax error: missing ';' before '{' (compiling source file src\main.cpp) Rocket League Inventory Extractor C:\Dev\vcpkg\installed\x64-windows\include\opencv2\dnn\version.hpp 15 Error C2447 '{': missing function header (old-style formal list?) (compiling source file src\main.cpp) Rocket League Inventory Extractor C:\Dev\vcpkg\installed\x64-windows\include\opencv2\dnn\version.hpp 15 Error C2059 syntax error: '(' (compiling source file src\main.cpp) Rocket League Inventory Extractor C:\Dev\vcpkg\installed\x64-windows\include\opencv2\dnn\dnn.inl.hpp 49 Error C2143 syntax error: missing ';' before '{' (compiling source file src\main.cpp) Rocket League Inventory Extractor C:\Dev\vcpkg\installed\x64-windows\include\opencv2\dnn\dnn.hpp 55 Error C2059 syntax error: '(' (compiling source file src\main.cpp) Rocket League Inventory Extractor C:\Dev\vcpkg\installed\x64-windows\include\opencv2\dnn\layer.hpp 48 Error C2059 syntax error: '(' (compiling source file src\main.cpp) Rocket League Inventory Extractor C:\Dev\vcpkg\installed\x64-windows\include\opencv2\dnn\utils\inference_engine.hpp 14 Error C2039 'Net': is not a member of 'cv::dnn' Rocket League Inventory Extractor C:\Users\Unknown_User\Documents\openFrameworks\apps\fantastic-finale-astudent82828211\Rocket League Inventory Extractor\src\main.cpp 44

How do I go about properly linking the dnn module and the other modules that cause errors that are within OpenCV?