C++ 使用Mingw make构建OpenCV 3.3会产生47%的错误2
当我试图用mingw编译器构建opencv3.3.0时,我总是遇到一个错误。首先,我使用CMake生成构建文件,我选择Mingw makefiles并自己选择gcc en g++编译器,尽管使用本机编译器会在同一时间产生相同的错误。然后,当我使用mingw32 make构建OpenCV时,我得到了以下大约48%的错误:C++ 使用Mingw make构建OpenCV 3.3会产生47%的错误2,c++,opencv,build,cmake,mingw,C++,Opencv,Build,Cmake,Mingw,当我试图用mingw编译器构建opencv3.3.0时,我总是遇到一个错误。首先,我使用CMake生成构建文件,我选择Mingw makefiles并自己选择gcc en g++编译器,尽管使用本机编译器会在同一时间产生相同的错误。然后,当我使用mingw32 make构建OpenCV时,我得到了以下大约48%的错误: 48%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx.cpp.
48%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx.cpp.obj
[ 48%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/convert.avx2.cpp.obj
[ 48%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx2.cpp.obj
[ 48%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj
[ 48%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj
C:\Qt\Tools\mingw530_32\bin\windres.exe: unknown option -- W
Usage: C:\Qt\Tools\mingw530_32\bin\windres.exe [option(s)] [input-file] [output-file]
The options are:
-i --input=<file> Name input file
-o --output=<file> Name output file
-J --input-format=<format> Specify input format
-O --output-format=<format> Specify output format
-F --target=<target> Specify COFF target
--preprocessor=<program> Program to use to preprocess rc file
--preprocessor-arg=<arg> Additional preprocessor argument
-I --include-dir=<dir> Include directory when preprocessing rc file
-D --define <sym>[=<val>] Define SYM when preprocessing rc file
-U --undefine <sym> Undefine SYM when preprocessing rc file
-v --verbose Verbose - tells you what it's doing
-c --codepage=<codepage> Specify default codepage
-l --language=<val> Set language when reading rc file
--use-temp-file Use a temporary file instead of popen to read
the preprocessor output
--no-use-temp-file Use popen (default)
-r Ignored for compatibility with rc
@<file> Read options from <file>
-h --help Print this help message
-V --version Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified. A single file name is an input file.
No input-file is stdin, default rc. No output-file is stdout, default rc.
C:\Qt\Tools\mingw530_32\bin\windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
modules\core\CMakeFiles\opencv_core.dir\build.make:1641: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj' failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
CMakeFiles\Makefile2:1550: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
当我开始建立一个图书馆的时候,我是一个新手,由于某种原因,建立图书馆似乎总是失败的。有人能帮我吗
-
玛蒂恩也许能帮上忙。这是cmake和预编译头的问题
尝试以下操作:在cmake中取消选中ENABLE_PRECOMPILED_头
也许我能帮上忙。这是cmake和预编译头的问题
尝试以下操作:在cmake中取消选中ENABLE_PRECOMPILED_头
如果取消选中ENABLE_PRECOMPILED_头不起作用。试试这个:
将新条目添加到CMake
将条目命名为:OPENCV\u分配器\u统计\u计数器\u类型,并使用ValueString:int64\t
配置并生成MAKEFILE
转到build目录并执行make install或mingw32 make install
如果您想了解编译日志的更多信息,如果取消选中ENABLE\u PRECOMPILED\u头不起作用,可以运行make install VERBOSE=1。试试这个:
将新条目添加到CMake
将条目命名为:OPENCV\u分配器\u统计\u计数器\u类型,并使用ValueString:int64\t
配置并生成MAKEFILE
转到build目录并执行make install或mingw32 make install
如果您想了解编译日志的更多信息,可以运行make install VERBOSE=1您能否详细说明链接中的答案,以防止链接出错的风险?这很有效!不幸的是,我后来在过程中遇到了另一个问题,但那个当然是离题了。谢谢你的回答!你能详细说明一下链接中的答案是什么,以防止链接变差的风险吗?这很有效!不幸的是,我后来在过程中遇到了另一个问题,但那个当然是离题了。谢谢你的回答!