/找不到bin/sh:pkg-config:命令
/bin/sh: pkg-config: command not found
我正试图从这个链接运行手势识别openCV示例项目https://github.com/simena86/handDetectionCV.我在cygwin终端中运行了make命令,但出现了错误。我在cygwin终端E中运行以下命令:\handDetectionCVmaster\make
输出:
Arun@Arun-PC /cygdrive/e/handDetectionCVmaster
$ make
g++ -o opencv main.cpp myImage.cpp handGesture.cpp roi.cpp `pkg-config --cflags --libs opencv`
/bin/sh: pkg-config: command not found
main.cpp:1:39: error: opencv2/imgproc/imgproc.hpp: No such file or directory
main.cpp:2:29: error: opencv2/opencv.hpp: No such file or directory
main.cpp:3:39: error: opencv2/highgui/highgui.hpp: No such file or directory
In file included from main.cpp:8:
myImage.hpp:8: error: 'cv' is not a namespace-name
myImage.hpp:8: error: expected namespace-name before ';' token
myImage.hpp:15: error: 'Mat' does not name a type
myImage.hpp:16: error: 'Mat' does not name a type
myImage.hpp:17: error: 'Mat' does not name a type
myImage.hpp:18: error: 'Mat' was not declared in this scope
myImage.hpp:18: error: template argument 1 is invalid
myImage.hpp:18: error: template argument 2 is invalid
myImage.hpp:19: error: 'VideoCapture' does not name a type
In file included from main.cpp:9:
roi.hpp:9: error: 'cv' is not a namespace-name
roi.hpp:9: error: expected namespace-name before ';' token
roi.hpp:14: error: expected ')' before 'upper_corner'
roi.hpp:15: error: 'Point' does not name a type
roi.hpp:16: error: 'Mat' does not name a type
roi.hpp:17: error: 'Scalar' does not name a type
roi.hpp:19: error: 'Mat' has not been declared
In file included from main.cpp:10:
handGesture.hpp:11: error: 'cv' is not a namespace-name
handGesture.hpp:11: error: expected namespace-name before ';' token
handGesture.hpp:18: error: 'Point' was not declared in this scope
handGesture.hpp:18: error: template argument 1 is invalid
handGesture.hpp:18: error: template argument 2 is invalid
handGesture.hpp:18: error: template argument 1 is invalid
handGesture.hpp:18: error: template argument 2 is invalid
handGesture.hpp:20: error: 'Point' was not declared in this scope
handGesture.hpp:20: error: template argument 1 is invalid
handGesture.hpp:20: error: template argument 2 is invalid
handGesture.hpp:20: error: template argument 1 is invalid
handGesture.hpp:20: error: template argument 2 is invalid
handGesture.hpp:21: error: 'Vec4i' was not declared in this scope
handGesture.hpp:21: error: template argument 1 is invalid
handGesture.hpp:21: error: template argument 2 is invalid
handGesture.hpp:21: error: template argument 1 is invalid
handGesture.hpp:21: error: template argument 2 is invalid
handGesture.hpp:22: error: 'Point' was not declared in this scope
handGesture.hpp:22: error: template argument 1 is invalid
handGesture.hpp:22: error: template argument 2 is invalid
handGesture.hpp:23: error: 'Rect' does not name a type
handGesture.hpp:24: error: 'Mat' has not been declared
handGesture.hpp:29: error: 'Rect' does not name a type
handGesture.hpp:44: error: 'Point' has not been declared
handGesture.hpp:44: error: 'Point' has not been declared
handGesture.hpp:44: error: 'Point' has not been declared
handGesture.hpp:53: error: 'Scalar' does not name a type
handGesture.hpp:55: error: 'Point' has not been declared
handGesture.hpp:55: error: 'Point' has not been declared
handGesture.hpp:56: error: 'Vec4i' was not declared in this scope
handGesture.hpp:56: error: template argument 1 is invalid
handGesture.hpp:56: error: template argument 2 is invalid
main.cpp:15: error: 'cv' is not a namespace-name
main.cpp:15: error: expected namespace-name before ';' token
main.cpp:19: error: 'FONT_HERSHEY_PLAIN' was not declared in this scope
这意味着您错过了pkg配置安装。这也是导致其余错误的原因,因为pkg-config
命令的输出无法分别调用。
转到以下网址,获取并安装:
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip
请注意,您可能需要从该站点安装更多的依赖项,但基本上它应该可以工作。
相关文章:
- 从命令行c++发送文本文件名
- 如何使用 < 和 > 命令获取 c++ 中的输入和输出?
- 为cl.exe(Visual Studio代码)指定命令行C++版本
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- 如何在OMNET++中指定与命令行参数组合的输出文件名
- 使用QProcess执行命令,并将结果存储在QStringList中
- 数组长度,为什么从命令行获取时不能使用它?
- Opencv4 使用 pkg-config 给出未定义的引用错误
- Cygwin pkg-config/protobuf filepath issues
- 如何在Visual Studio Code中使用'pkg-config gtkmm-3.0 --cflags --lib
- 当 pkg-config 不能解决 opencv 'undefined reference'编译问题时,如何解决它?
- 如何在CMAKE(JUCI )中使用PKG-Config
- GTKMM-3.0:使用PKG-Config的程序构建失败的MSYS2 NetBeans
- 如何将 pkg-config 添加到生成文件
- QtCreator and pkg-config
- pkg-config 在 Cygwin 上不起作用
- g++编译器选项使用' pkg-config..的结果是-I(directory) -I是什么意思?
- 为什么pkg-config——libs opencv返回库位置而不是库本身?
- 如何在CMake的CXX_FLAGS中包含“pkg-config——cflags——libs gtk+-2.0”
- /找不到bin/sh:pkg-config:命令