Skip to content

Build fails with error "opencv2/gapi.hpp: No such file or directory" #21804

@caijun199702

Description

@caijun199702

When I build opencv 4.x on my ubuntu20.04, I get the following Error:
fatal error: opencv2/gapi.hpp: No such file or directory
1 | #include <opencv4/gapi.hpp>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [samples/cpp/CMakeFiles/example_tutorial_dynamic_graph_snippets.dir/build.make:63: samples/cpp/CMakeFiles/example_tutorial_dynamic_graph_snippets.dir/tutorial_code/gapi/doc_snippets/dynamic_graph_snippets.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:20543: samples/cpp/CMakeFiles/example_tutorial_dynamic_graph_snippets.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Could anyone help to solve this problem? thanks~

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions