我想为 QT 编译 opencv。我用这个教程
http://www.laganiere.name/opencvCookbook/chap1s1_2.shtml
在第 8 步中我有这个错误:
C:\opencv_bin1>mingw32-make
[ 0%] Building C object 3rdparty/zlib/CMakeFiles/zlib.dir/adler32.c.obj
'C:\Users\' is not recognized as an internal or external command,
operable program or batch file.
3rdparty\zlib\CMakeFiles\zlib.dir\build.make:53: recipe for target
'3rdparty/zlib/CMakeFiles/zlib.dir/adler32.c.obj' failed mingw32-make[2]: *** [3rdparty/zlib/CMakeFiles/zlib.dir/adler32.c.obj] Error 1 CMakeFiles\Makefile2:269: recipe for target '3rdparty/zlib/CMakeFiles/zlib.dir/all' failed mingw32-make[1]: *** [3rdparty/zlib/CMakeFiles/zlib.dir/all] Error 2 makefile:112: recipe for target 'all' failed mingw32-make: *** [all] Error 2
我认为它来自路径变量,但我看不到它有错误。任何想法?
EDIT
当我使用 make 而不是 mingw32-make 时:
path variables:
用户变量:
C:\opencv\build\x64\vc10\bin\;C:\opencv\build\common\tbb\intel64\vc10\;C:\ffmpeg\bin;C:\op
ncv\build\x64\vc10\bin\;c:\Program Files\Microsoft Visual Studio
10.0\Common7\Tools\;C:\jom\jom.exe\;C:\Windows\System32\;C:\Program Files (x86)\CMake
2.6\bin\;C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\;C:\Qt\Qt5.0.1\Tools\MinGW\bin\;
系统变量:
C:\Borland\Delphi7\Bin;C:\Borland\Delphi7\Projects\Bpl\;C:\Inprise\vbroker\bin;C:\Qt\Qt5.0.
1\5.0.1\mingw47_32\bin;C:\Qt\Qt5.0.1\Tools\MinGW\bin;C:\Program Files (x86)\CMake
2.8\bin\;C:\Windows\System32\;
我下载 msys 并将它的 bin 文件夹添加到路径。现在,当我进入 opencv 目录并输入 make 时,它写道:
C:\opencv_Bin>make
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.