如何将 'cmake' 中的 qtconfig 选项更改为 qtconfig4?
How to change qtconfig option in 'cmake' to qtconfig4?
在配置 krita 时,我收到一个cmake
错误Unable to compile a basic Qt application. Qt has not been found correctly.
说我认为原因是 QT5 和 QT4 开发包之间存在冲突。怎么办?
sricharan@sricharan-Lenovo-Z580:~/kde4/build$ sudo cmake -DCMAKE_INSTALL_PREFIX=$HOME/kde4/inst $HOME/kde4/src/calligra -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRODUCTSET=KRITA
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Calligra version: 2.9 Pre-Alpha
-- Release build: TRUE
-- -------------------------------------------------------------------
-- Configured with product set "KRITA"
-- -------------------------------------------------------------------
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt-Version 5.2.1 (using /usr/bin/qmake)
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Automoc4: /usr/bin/automoc4
-- Found Perl: /usr/bin/perl (found version "5.18.2")
-- Found Phonon: /usr/include (Required is at least version "4.3.80")
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_FPIE_SUPPORT
-- Performing Test HAVE_FPIE_SUPPORT - Success
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
-- Performing Test __KDE_HAVE_GCC_VISIBILITY
-- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
QT_QT_INCLUDE_DIR
used as include directory in directory /home/sricharan/kde4/build/CMakeFiles/CMakeTmp
CMake Error: Internal CMake error, TryCompile configure of cmake failed
CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1311 (message):
Unable to compile a basic Qt application. Qt has not been found correctly.
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
CMakeLists.txt:146 (find_package)
-- Configuring incomplete, errors occurred!
我不确定,但也许原因是它是 QT5 但 KDE4 需要 QT4。我已经安装了所需的libqt4
库,但这无济于事。我该怎么办?
请告诉我我是否以错误的方式推断错误。
您可以使用 QT_SELECT env 变量。(apt-get install qtchooser(
例
export QT_SELECT=4
或
export QT_SELECT=qt4
export QT_SELECT=4
和 export QT_SELECT=qt
似乎不再适用于 cmake
2.8.12.2,变量必须cmake
变量,即运行
cmake . -DQT_QT_INCLUDE_DIR=/usr/include/qt4/ -DQT_SELECT=4
make
编译
一些构建文件没有考虑环境变量的使用,因此它不是可归因于 cmake 的错误。
相关文章:
- 如何在选项卡视图Qt中设置一个新项目,并保存以前的项目
- Win32编译器选项和内存分配
- C/C++预处理器是否可以检测一些编译器选项
- 是否有C++编译器选项允许激进地删除所有函数调用,并将参数传递给具有空体的函数
- 将--whole archive链接器选项与CMake和具有其他库依赖项的库一起使用
- 通过选项卡的文本设置QTabWidget顺序
- 通过ccmake在cmake中缓存依赖选项
- 如何传递多个 std::文件系统选项?
- 基于编译器选项的编译二进制路径
- "perf_event_attr"结构的"read_format"属性的选项到底是什么?
- 如何应用 libcurl 的持久连接选项
- 文件中.dat Dlib 选项
- LLVM | codegen 用于带有命令行选项的程序输入功能
- 编译 Boost 时在 OS X 上的"ld:未知选项:-soname"
- 按钮悬停在 QT 中垂直布局的选项卡小部件中不起作用
- Visual Studio C++ 它只构建选项卡中显示的文件吗?
- 在C++不适用于猜数字游戏的情况下再次播放选项
- Qt5 用户界面编译器:-i 选项不可用
- CMake - 更改共享库链接选项
- 如何将 'cmake' 中的 qtconfig 选项更改为 qtconfig4?