Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问这个 c++ demo入和运行 #27

Open
tongchangD opened this issue Jul 24, 2023 · 1 comment
Open

请问这个 c++ demo入和运行 #27

tongchangD opened this issue Jul 24, 2023 · 1 comment

Comments

@tongchangD
Copy link

tongchangD commented Jul 24, 2023

您好,我刚刚接触C++,请问这个代码如何测试
我在网上查

g++ -o test main_yolo.cpp

可是报错

In file included from main_yolo.cpp:1:
yolo.h:7:10: fatal error: opencv2/dnn.hpp: 没有那个文件或目录
 #include <opencv2/dnn.hpp>
          ^~~~~~~~~~~~~~~~~
compilation terminated.

但是在我电脑里面终端输入

whereis opencv

会得到

opencv: /usr/include/opencv /usr/share/opencv

请问是哪儿存在了问题

祝好
tongchangD

@Atomadeus
Copy link

这个问题其实很基础,不过我一开始也卡在这了,你只需要把OpenCV的include文件夹引入即可,记住是include文件夹不是opencv2文件夹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants