RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / 问题 / 740192
Accepted
shaman888
shaman888
Asked:2020-11-04 19:56:12 +0000 UTC2020-11-04 19:56:12 +0000 UTC 2020-11-04 19:56:12 +0000 UTC

将 Qt4 设置为 cmake Ubuntu 16.04 的默认值

  • 772

Linux 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 Qtcreator 需要运行一个 cmake 项目。应该指定哪些启动选项来为 Qt4 设置项目?

附言

将部分问题移至答案。

linux
  • 1 1 个回答
  • 10 Views

1 个回答

  • Voted
  1. Best Answer
    shaman888
    2020-11-09T12:19:43Z2020-11-09T12:19:43Z
    sudo apt install kde*
    sudo apt-get install libc6-dev libssl-dev dpkg-dev debhelper fakeroot libxml2-dev libxslt1-dev
    

    接下来我使用 cmake 启动选项

    -DQT_QMAKE_EXECUTABLE=qmake-qt4
    

    我用发电机

    Unix 生成器 (4.8.7 x64)

    资料来源:一、二。

    修复错误:

    -- Found Qt-Version 5.5.1 (using /usr/lib/x86_64-linux-gnu/qt5/bin/qmake)
    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/alexandr/krecipes-build/CMakeFiles/CMakeTmp
       used as include directory in directory /home/alexandr/krecipes-build/CMakeFiles/CMakeTmp
       used as include directory in directory /home/alexandr/krecipes-build/CMakeFiles/CMakeTmp
    
    CMake Error: Internal CMake error, TryCompile configure of cmake failed
    
    CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1283 (message):
      Unable to compile a basic Qt application.  Qt has not been found correctly.
    Call Stack (most recent call first):
      /usr/share/cmake-3.5/Modules/FindKDE4.cmake:108 (find_package)
      CMakeLists.txt:8 (find_package)
    
    
    CMake Warning (dev) in CMakeLists.txt:
      No cmake_minimum_required command is present.  A line of code such as
    
        cmake_minimum_required(VERSION 3.5)
    
      should be added at the top of the file.  The version specified may be lower
      if you wish to support older CMake versions for this project.  For more
      information run "cmake --help-policy CMP0000".
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Configuring incomplete, errors occurred!
    See also "/home/alexandr/krecipes-build/CMakeFiles/CMakeOutput.log".
    See also "/home/alexandr/krecipes-build/CMakeFiles/CMakeError.log".
    

    也:

    -- The C compiler identification is GNU 5.4.0
    -- The CXX compiler identification is GNU 5.4.0
    -- 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
    -- Detecting C compile features
    -- Detecting C compile features - 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
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Looking for Q_WS_X11
    -- Looking for Q_WS_X11 - 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 4.8.7 (using /usr/bin/qmake-qt4)
    -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXau.so;/usr/lib/x86_64-linux-gnu/libXdmcp.so
    -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXau.so;/usr/lib/x86_64-linux-gnu/libXdmcp.so - found
    -- Looking for gethostbyname
    -- Looking for gethostbyname - found
    -- Looking for connect
    -- Looking for connect - found
    -- Looking for remove
    -- Looking for remove - found
    -- Looking for shmat
    -- Looking for shmat - found
    -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
    -- Looking for pthread.h
    -- Looking for 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  
    -- Looking for _POSIX_TIMERS
    -- Looking for _POSIX_TIMERS - found
    -- Found Automoc4: /usr/bin/automoc4  
    -- Found Perl: /usr/bin/perl (found version "5.22.1") 
    -- 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
    -- Found KDE 4.12 include dir: /usr/include
    -- Found KDE 4.12 library dir: /usr/lib
    -- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
    -- Found automoc4: /usr/bin/automoc4
    CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
      Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
    Call Stack (most recent call first):
      /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
      /usr/share/cmake-3.5/Modules/FindLibXml2.cmake:69 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      src/CMakeLists.txt:1 (find_package)
    
    
    CMake Warning (dev) in CMakeLists.txt:
      No cmake_minimum_required command is present.  A line of code such as
    
        cmake_minimum_required(VERSION 3.5)
    
      should be added at the top of the file.  The version specified may be lower
      if you wish to support older CMake versions for this project.  For more
      information run "cmake --help-policy CMP0000".
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Configuring incomplete, errors occurred!
    See also "/home/alexandr/krecipes-build/CMakeFiles/CMakeOutput.log".
    See also "/home/alexandr/krecipes-build/CMakeFiles/CMakeError.log".
    
    • 0

相关问题

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    Python 3.6 - 安装 MySQL (Windows)

    • 1 个回答
  • Marko Smith

    C++ 编写程序“计算单个岛屿”。填充一个二维数组 12x12 0 和 1

    • 2 个回答
  • Marko Smith

    返回指针的函数

    • 1 个回答
  • Marko Smith

    我使用 django 管理面板添加图像,但它没有显示

    • 1 个回答
  • Marko Smith

    这些条目是什么意思,它们的完整等效项是什么样的

    • 2 个回答
  • Marko Smith

    浏览器仍然缓存文件数据

    • 1 个回答
  • Marko Smith

    在 Excel VBA 中激活工作表的问题

    • 3 个回答
  • Marko Smith

    为什么内置类型中包含复数而小数不包含?

    • 2 个回答
  • Marko Smith

    获得唯一途径

    • 3 个回答
  • Marko Smith

    告诉我一个像幻灯片一样创建滚动的库

    • 1 个回答
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Алексей Шиманский 如何以及通过什么方式来查找 Javascript 代码中的错误? 2020-08-03 00:21:37 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    user207618 Codegolf——组合选择算法的实现 2020-10-23 18:46:29 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5