opencv 编译objects.a(vs_version.rc.obj)‘ is incompatible with i386:x86-64 output

37% Built target IlmImf

37% Built target libprotobuf

C:/Qt/Qt5.14.2/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.

./../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `CMakeFiles\

opencv_core.dir/objects.a(vs_version.rc.obj)' is incompatible with i386:x86-64 o

utput

collect2.exe: error: ld returned 1 exit status

mingw32-make2: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1630: b

in/libopencv_core453d.dll] Error 1

mingw32-make1: *** [CMakeFiles\Makefile2:1749: modules/core/CMakeFiles/opencv_

core.dir/all] Error 2

mingw32-make: *** [Makefile](https://so.csdn.net/so/search?q=Makefile&spm=1001.2101.3001.7020):165: all Error 2

解决方法:

Problem is somewhere here (added for 3.3.0 release). Like @mshabunin said take a look on CMAKE_RC_COMPILER variable.

Or try using OPENCV_VS_VERSIONINFO_SKIP=1 CMake option.

cmake里面手动添加:OPENCV_VS_VERSIONINFO_SKIP

cmake界面按钮: add Entry --->>> BOOL --->>> OPENCV_VS_VERSIONINFO_SKIP 打钩

相关推荐
墨舟的AI笔记2 小时前
React 组件库的 Tree Shaking:按需加载与副作用的工程化治理
人工智能
WoooChi3 小时前
DailyTech-20260724
人工智能·科技·业界资讯
zh路西法3 小时前
【CAM Grad-CAM Grad-CAM++】深度学习模型可解释性:从原理到YOLOv8部署实战
人工智能·深度学习·yolo·yolov8·grad-cam·cam
雨辰AI3 小时前
全集实战:企业级大模型服务化部署全栈指南|FastAPI 封装 + Nginx 负载均衡 + 高可用架构 从单机到生产一步到位
人工智能·ai·负载均衡·fastapi·ai编程
触底反弹3 小时前
Vibe Coding 不写 Git,等于悬崖边飙车
人工智能·git·面试
咖啡屋和酒吧4 小时前
健康管理:现代生活的科学守护
人工智能·生活·精选
星栈独行4 小时前
翻完 Pi 源码:它和 Codex、Claude Code 有何不同
开发语言·javascript·人工智能·程序人生
没有梦想的咸鱼185-1037-16634 小时前
AI-Python机器学习与深度学习技术:CNN/Transformer/扩散模型、SHAP可解释及Hermes智能体自动化
人工智能·python·深度学习·机器学习·chatgpt·cnn·transformer
船漏了就会沉4 小时前
Kimi K3 vs DeepSeek-V4:国产大模型的技术路线之争
人工智能
kirs_ur4 小时前
SSD 在 AI 训练中的角色
大数据·服务器·人工智能