使用#include <pthread.h>
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
在Linux中使用线程相关的东西就要使用到这个头文件,但这还不算。如果仅仅使用这个头文件,会出现错误:
undefined reference to `pthread_create' |
之所以出现这样的错误,是因为我们没有链接相应的函数库。所以在编译的时候要加上 –lpthread 选项。
Makefile文件如下:
CC = gcc CFLAGS = -I/home/cat/apue/apue.2e/include -Wall -g threadid: threadid.o $(CC) $(CFLAGS) -o $@ $^ -lpthread
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:23 天前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献5条内容
所有评论(0)