在程序中用到了pthread_create()函数,包含了头文件pthread.h,连接时出现错误undefined reference to `pthread_create',需要动态加载相应的库,编译选项中加入-lpthread选项,即可,-lpthread 则意味着链接库目录下的libpthread.a 或libpthread.so 文件
连接错误undefined reference to `pthread_create'
最新推荐文章于 2023-03-25 09:44:29 发布