使用 mingw 和 cmake 构建 opencv 时出错:"windres.exe: invalid option -- W"

Error while building opencv with mingw and cmake : "windres.exe: invalid option -- W"

我正在尝试使用 mingw 和 cmake 构建 opencv 3.4 源代码。我已经配置并使用 cmake 生成,然后在 cmake

中选择的构建目录中使用 admin powershell i 运行 mingw32-make.exe

这里是输出的最后几行:

使用mingw编译器构建opencv时需要在CMake中禁用预编译headers。