pkg-config:命令未找到,在Windows 7上使用cygwin [英] pkg-config: command not found, using cygwin on windows 7

查看:2331
本文介绍了pkg-config:命令未找到,在Windows 7上使用cygwin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用Cygwin来运行此命令:

I'm using Cygwin on windows to run this command:

 g++ `pkgconfig --libs --cflags opencv` -I. -o mergevec mergevec.cpp ....

但我得到一个错误:

-bash: pkg-config: command not found

我直接在C:上安装了cygwin。我已经添加到PATH环境变量以下:

I've installed cygwin directly on C:. I've added to the PATH environment variable the following:

C:\cygwin64\bin;
C:\cygwin64\lib

我运行 cygcheck -c ,它给出了一个完整的软件包列表,但 pkg-config 不在该列表中。
虽然在 C:\cygwin64\lib 中有一个名为 pkgconfig
如何修复此错误?

I've run cygcheck -c and it gives me a whole list of packages, but pkg-config isn't in that list. There is a folder called pkgconfig in C:\cygwin64\lib though. How do I fix this error?

推荐答案

pkg-config是一种允许您的计算机检查用于源编译的已安装库。它可能不会安装在Windows上,所以在最后一个情况请检查安装。

pkg-config is a piece of software that allow your computer to check installed libraries for source compilation. It may not be installed on Windows so in last scenario please check for install.

但是在你的情况下,我认为它是安装,但没有设置在正确的路径linux命令。尝试输入cygwin:

However in your case i think it is installed, but not set on the right path for linux commands. Try to type in cygwin:

$ export PKG_CONFIG_PATH=c:\\cygwin\\usr\\local\\lib\\pkgconfig 



< ://stackoverflow.com/questions/8307339/pkg-config-doesnt-work-on-cygwin> post 。

否则就放弃Windows和尝试在Linux VM上编译mergevec,这真的更容易(它是为它做的)。这个方法的唯一的缺点是,你必须在你的linux空间下做mergevec操作(和之前的,否则你可能有编码问题)。请参阅我之前的回答

Otherwise just abandon Windows and try to compile mergevec on an Linux VM, which is really easier (it was made for it). The only down point of this method is that you will have to do the mergevec operation (and the ones before, otherwise you may have encoding problems) under your linux space. See my previous answer for this manipulation.

如果任何问题不要犹豫。

If any problem don't hesitate.

这篇关于pkg-config:命令未找到,在Windows 7上使用cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆