zoukankan      html  css  js  c++  java
  • cmake 编译出现错误 Could NOT find Threads (missing: Threads_FOUND)

    1. 出现的错误如下

    Could NOT find Threads (missing: Threads_FOUND)
    Call Stack (most recent call first):
      /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
      /usr/share/cmake-3.10/Modules/FindThreads.cmake:205 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
      CMakeLists.txt:55 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/qhq/mt7621_5g_mec/OTA-hw v1.0.0/build/CMakeFiles/CMakeOutput.log".
    See also "/home/qhq/mt7621_5g_mec/OTA-hw v1.0.0/build/CMakeFiles/CMakeError.log".

     

    2. 说法是

    CMake使用短的“C”应用程序来测试/尝试某些东西。如果CMakeLists.txt文件声明C++用于项目,而不列出C,
    那么一些短裤测试错误地失败,CFAG则认为这些东西没有找到。

    3. 修改方案是 PROJECT ( Test CXX ) 修改为 PROJECT ( Test C CXX ),修改完之后cmake 指令通过

     

    4. 然后编译 make CC=/home/qhq/toolchain-mipsel-gcc-8.3.0/bin/mipsel-openwrt-linux-gcc

    修改完编译之后报错

    mipsel-openwrt-linux-gcc: error: unrecognized command line option '-m32'
    mipsel-openwrt-linux-gcc: error: unrecognized command line option '-m32'

     

    5. 修改文件CMakeLists.txt 文件,如下图

     

    6. 问题解决,编译通过

     

  • 相关阅读:
    诊断
    HIS内号码说明
    ASP.NET Page life cycle
    ASP.NET Simple page life cycle
    java多线程
    ibatis sqlmap
    cglib和asm
    利用ant编译maven项目
    Spring Cache与Tair结合
    USACO 1.2 MILKING COWS
  • 原文地址:https://www.cnblogs.com/429512065qhq/p/13705589.html
Copyright © 2011-2022 走看看