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

2015-11-27 08:15:51 +08:00
 qq674949301
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
请各位大侠帮忙看看该如何解决!
2609 次点击
所在节点    编程
2 条回复
fxxkgw
2015-11-27 11:11:44 +08:00
makefile 里面加上 pthread 库就可以了
fxxkgw
2015-11-27 11:13:30 +08:00
几年没做嵌入式了 我记得以前随便写个.c 文件 只要用了 pthread 系列函数 直接编成 a.out 跑就提示缺少 pthread 库 需要在编的时候链接上 pthread.so 只在 gcc 时候加上-o 参数

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/239286

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX