cmake编译colmap报错QT Could not find the Qt platform plugin "windows" in ""
1.问题
使用CMake编译colmap,编译完成后,在colmap生成的exe目录中powershell运行“colmap gui”打开GUI界面,报错
E:\PyProjects\Demo\colmap\build\src\colmap\exe\Release>colmap.exe gui qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fi x this problem.
CMake版本 4.2.0
colmap版本 3.14.0 dev
电脑安装的QT版本 5.15.2
qwindows.dll 存在
2.原因
2.1 chatgpt解释
这是 Windows 下典型的 Qt 运行时插件路径问题,与 COLMAP 是否成功编译本身无关,而是 Qt 平台插件(platforms/windows.dll)在运行时未被正确找到。当前的错误信息已经非常明确地指向了这一点。
(1)启用 Qt 插件调试
在 Release 目录,执行: