本文介绍了Qt4不会编译与CMake的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在的Linux与KDevelop的对C下++,我想编译Qt4的应用程序,但是当我这样做,它给了我以下错误:
我编译:
cmake的-DCMAKE_INSTALL_PREFIX =的/ usr /本地-DCMAKE_BUILD_TYPE =调试的/ home / MYNAME /项目/第一的Qt谟/
这些是错误:
- 配置不完整,发生错误!
CMake的错误在/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97(消息):
找不到的Qt4(丢失:QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR
QT_QTCORE_LIBRARY)
调用堆栈(最近一次调用在前):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288(_FPHSA_FAILURE_MESSAGE)
的/ usr /共享/ cmake的-2.8 /模块/ FindQt4.cmake:1200(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
的CMakeLists.txt:3(find_package)
我应该怎么办?
解决方案
命令和apt-get安装libqt4-核心libqt4-dev libqt4-gui qt4-dev-tools
这应该为您安装qt4: USR / lib64目录/ QT ...从那里 cmake的
应该能够拿起QT的位置给你。
如果命令行不是你的风格,你也可以使用Ubuntu包管理器。
I'm now under Linux with KDevelop for C++ and I want to compile a Qt4 application, but when I do, it gives me the following error :
I compile with:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug /home/myname/projects/First Qt projet/
Those are the errors:
-- Configuring incomplete, errors occurred!
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR
QT_QTCORE_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-2.8/Modules/FindQt4.cmake:1200 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:3 (find_package)
What should I do ?
解决方案
sudo apt-get install libqt4-core libqt4-dev libqt4-gui qt4-dev-tools
This should install qt4 for you in: /usr/lib64/qt... from there cmake
should be able to pick up the location of qt for you.
You can also use that Ubuntu package manager thingy if command line isn't your style.
这篇关于Qt4不会编译与CMake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!