Qt5
我将项目文件夹从计算机复制/粘贴到另一台计算机。他们都是Ubuntu 18.04
。
相同版本Qt5
和相同的库/依赖项。在新电脑上,我有CMake 3.10.2
,但我不记得CMake
我在前一台电脑上的版本。(可能CMake 3.8
)。
只要我打开Qt5
并打开包含该CMakeLists.txt
文件的文件夹,然后单击它,我就会从输出中得到以下结果:
08:02:22: Running steps for project newcam-proc...
08:02:22: Persisting CMake state...
08:02:22: Starting: "/usr/bin/snap" --build . --target all error: unknown flag `build'
08:02:22: The process "/usr/bin/snap" exited with code 1.
Error while building/deploying project myProject (kit: Desktop Qt 5.12.5 GCC 64bit)
The kit Desktop Qt 5.12.5 GCC 64bit has configuration issues which might be the root cause for this problem. When executing step "CMake Build"
08:02:22: Elapsed time: 00:00.
在General Message
我得到的下面:
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file /home/emanuele/Qt/5.12.5/android_armv7/mkspecs/android-clang/qmake.conf.
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file /home/emanuele/Qt/5.12.5/android_x86/mkspecs/android-clang/qmake.conf.
Running /usr/bin/snap /home/emanuele/Desktop/myProject -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++ -DCMAKE_C_COMPILER:STRING=/usr/bin/gcc -DCMAKE_PREFIX_PATH:STRING=/home/emanuele/Qt/5.12.5/gcc_64 -DQT_QMAKE_EXECUTABLE:STRING=/home/emanuele/Qt/5.12.5/gcc_64/bin/qmake in /tmp/QtCreator-vlHbHY/qtc-cmake-LvUefYdh.
error: unknown command "/home/emanuele/Desktop/myProject", see 'snap help'.
CMake process exited with exit code 1.
我从来不需要Android NDK
在我以前的项目中使用,也不需要安装它。而且我不确定为什么在新机器上显示此消息。
此外,它似乎正在尝试使用snap
而不是通常的make
.
我不确定发生了什么以及为什么。
到目前为止我尝试了什么:
1)我唯一想到的是尝试创建一个小示例应用程序并查看它是否运行,它实际上运行正常并且没有错误,如下所示:
08:16:00: Running steps for project untitled...
08:16:00: Configuration unchanged, skipping qmake step.
08:16:00: Starting: "/usr/bin/make" -j8
make: Nothing to be done for 'first'.
08:16:00: The process "/usr/bin/make" exited normally.
08:16:00: Elapsed time: 00:00.
似乎我复制/粘贴的项目使用snap
了,如果我创建一个新项目,如 a Qt Widget application
,它实际上使用make
,在输出中正确退出。