错误提示:undefined reference to `pthread_create'
2015-04-28 17:43
211 查看
错误提示:undefined reference to `pthread_create'
undefined reference to `pthread_join'
原因:pthread.h不是Linux默认的库,所以gcc不能直接找到它进行编译;
解决办法:在gcc编译时加入 -lpthread
如:gcc -o TCP_server_thread TCP_server_thread.c -lpthread
undefined reference to `pthread_join'
原因:pthread.h不是Linux默认的库,所以gcc不能直接找到它进行编译;
解决办法:在gcc编译时加入 -lpthread
如:gcc -o TCP_server_thread TCP_server_thread.c -lpthread
相关文章推荐
- eclipse编译openwrt应用程序报Type undefined reference to `pthread_create'错误解决方法
- QT多线程中undefined reference to 'pthread_create'错误的解决
- undefined reference to `pthread_create'的错误。
- undefined reference to `pthread_create'错误通过makefie的解决方法
- undefined reference to 'pthread_create' 错误
- 连接错误undefined reference to `pthread_create'
- gcc 编译出现undefined reference to‘pthread_create’的错误
- 在liunx编译C语言程序出现Undefined reference to pthread_create in Linux 错误*
- 解决QT多线程中undefined reference to 'pthread_create'的错误
- Linux学习-线程的创建和终止-(出现错误-undefined reference to 'pthread_create')
- Ubuntu下使用Eclipse编译pthread程序错误undefined reference to `pthread_create'
- 解决错误---undefined reference to `pthread_create‘
- 编译错误----undefined reference to 'pthread_create'问题解决
- linux编译出现undefined reference to symbol 'pthread_create错误解决方案
- undefined reference to 'pthread_create'问题解决
- eclipse 函数编译时报错:undefined reference to `pthread_create’
- undefined reference to 'pthread_create'问题解决
- Linux下"undefined reference to ‘pthread_create’"问题解决
- undefined reference to 'pthread_create' 问题
- undefined reference to 'pthread_create'