问题描述
- [求解答!]mac os的终端里怎么编译opencv程序呢?
-
wangxiaoxiaodeMacBook-Air:cpp wangxiaoxiao$ g++ facedetect.cpp -o facedetect `pkg-config-cflags --libs opencv` -bash: pkg-config-cflags: command not found facedetect.cpp:1:10: fatal error: 'opencv2/opencv.hpp' file not found #include "opencv2/opencv.hpp" ^ 1 error generated.
使用pkg-config-cflags编译但是找不到头文件是怎么回事呢?
解决方案
用Xcode编呗,opencv的头文件在/usr/local/include以及/usr/local/includ/opencv里面
时间: 2024-10-29 13:40:08