简体   繁体   English

CMake:配置过程出错,工程文件可能无效

[英]CMake :Error in configuration process, project files may be invalid

I am new to cmake. I am trying to build opencv using cmake 3.7.2 (64 bit)to be used in Qt. I am working on a windows 10 64 bit system.我是 cmake 的新手。我正在尝试使用 cmake 3.7.2(64 位)构建 opencv,以用于 Qt。我正在使用 windows 10 64 位系统。 I have followed the steps given in the link: https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows我已按照链接中给出的步骤操作: https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows

As per the instructions I installed Qt-Qt5.9-MingGW 5.3.0 32 bit.按照说明,我安装了 Qt-Qt5.9-MingGW 5.3.0 32 位。

The path for MinGW is also set to C:\Qt\Tools\mingw530_32\bin. MinGW的路径也设置为C:\Qt\Tools\mingw530_32\bin。

The link above shows the following instructions:上面的链接显示了以下说明:

Compiling OpenCV编译 OpenCV

When I followed the instructions for building opencv I got the following error after clicking "Configure"当我按照构建 opencv 的说明进行操作时,单击“配置”后出现以下错误

Error message错误信息

It would be good if someone can help me with this problem.如果有人能帮我解决这个问题就好了。

I believe you missed the instruction to set QT_MAKE_EXECUTABLE and other variables in cmake-gui.我相信您错过了在 cmake-gui 中设置QT_MAKE_EXECUTABLE和其他变量的说明。 The instructions from the https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows documentation state this:来自https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows文档 state 的说明:

Set QT_MAKE_EXECUTABLE to D:\Qt\5.9\mingw53_32\bin\qmake.exe Set Qt5Concurrent_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Concurrent Set Qt5Core_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Core Set Qt5Gui_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Gui Set Qt5Test_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Test Set Qt5Widgets_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Widgets Set Qt5OpenGL_DIR to D:\Qt\5.9\mingw53_32\lib\cmake\Qt5OpenGL Set CMAKE_BUILD_TYPE to Release or RelWithDebInfo Set OPENCV_VS_VERSIONINFO_SKIP=1将 QT_MAKE_EXECUTABLE 设置为 D:\Qt\5.9\mingw53_32\bin\qmake.exe 将 Qt5Concurrent_DIR 设置为 D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Concurrent 将 Qt5Core_DIR 设置为 D:\Qt\5.9\mingw53_32\lib\cmake\ Qt5Core 设置Qt5Gui_DIR为D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Gui 设置Qt5Test_DIR为D:\Qt\5.9\mingw53_32\lib\cmake\Qt5Test 设置Qt5Widgets_DIR为D:\Qt\5.9\mingw53_32\lib\cmake \Qt5Widgets 设置 Qt5OpenGL_DIR 为 D:\Qt\5.9\mingw53_32\lib\cmake\Qt5OpenGL 设置 CMAKE_BUILD_TYPE 为 Release 或 RelWithDebInfo 设置 OPENCV_VS_VERSIONINFO_SKIP=1

You do these inside cmake-gui你在 cmake-gui 中做这些

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM