热门标签
更多>
搜索结果
查询Tags标签: lpthread,共有 2条记录-
关于线程-lpthread问题
pthread_create函数编译时报错:undefined reference to pthread_create由于pthread 库不是 Linux 系统默认的库,链接时需要使用静态库 libpthread.a;所以在编译使用pthread_create()创建线程的程序时,需要指定 -lpthread参数。例如:gcc thread.c -o thread -lpthread
2022/1/3 6:09:16 人评论 次浏览 -
关于线程-lpthread问题
pthread_create函数编译时报错:undefined reference to pthread_create由于pthread 库不是 Linux 系统默认的库,链接时需要使用静态库 libpthread.a;所以在编译使用pthread_create()创建线程的程序时,需要指定 -lpthread参数。例如:gcc thread.c -o thread -lpthread
2022/1/3 6:09:16 人评论 次浏览