本文主要是介绍linux 编译lpthread,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1:undefined reference to `pthread_create' gcc main.c -o test -lpthread |
[root@hqgao ddserver]# gcc ddserver.c -o ddserver -lpthread [root@hqgao ddserver]# ./ddserver Segmentation fault |
makefile 简单例子 all: httpd client LIBS = -lpthread #-lsocket httpd: httpd.c gcc -g -W -Wall $(LIBS) -o $@ $ client: simpleclient.c gcc -W -Wall -o $@ $ clean: rm httpd |
这篇关于linux 编译lpthread的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!