qq674949301
V2EX  ›  编程

用 tomato-arm 的 toolchain 在 ubuntu 下交叉编译出现 Missing Pthread Library

  •  
  •   qq674949301 · Nov 27, 2015 · 3481 views
    This topic created in 3830 days ago, the information mentioned may be changed or developed.
    checking for the pthreads library -lpthreads... no
    checking whether pthreads work without any flags... no
    checking whether pthreads work with -Kthread... no
    checking whether pthreads work with -kthread... no
    checking for the pthreads library -llthread... no
    checking whether pthreads work with -pthread... no
    checking whether pthreads work with -pthreads... no
    checking whether pthreads work with -mthreads... no
    checking for the pthreads library -lpthread... no
    checking whether pthreads work with --thread-safe... no
    checking whether pthreads work with -mt... no
    checking for pthread-config... no
    configure: error: Missing Pthread Library
    请各位大侠帮忙看看该如何解决!
    2 replies    2015-11-27 11:13:30 +08:00
    fxxkgw
        1
    fxxkgw  
       Nov 27, 2015
    makefile 里面加上 pthread 库就可以了
    fxxkgw
        2
    fxxkgw  
       Nov 27, 2015
    几年没做嵌入式了 我记得以前随便写个.c 文件 只要用了 pthread 系列函数 直接编成 a.out 跑就提示缺少 pthread 库 需要在编的时候链接上 pthread.so 只在 gcc 时候加上-o 参数
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 02:25 · PVG 10:25 · LAX 19:25 · JFK 22:25
    ♥ Do have faith in what you're doing.