首页 > 系统相关 >Linux c++ 试验-10 一例undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'”

Linux c++ 试验-10 一例undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'”

时间:2022-08-18 11:15:35浏览次数:62  
标签:10 undefined reference create symbol pthread 2.2 GLIBC

最近在编写一个程序时(x64 Linux,Arm下没有这个问题),出现了undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'”,明明有设置-pthread(l60870里用到了这个库)。经过测试,有两种解决办法
1、任意一个代码里调用
pthread_create
2、将lpthread放到最后
-lssl -lcrypto -lmosquitto -lpthread -lcares -lzlog -l60870 -lcjson

标签:10,undefined,reference,create,symbol,pthread,2.2,GLIBC
From: https://www.cnblogs.com/zhaogaojian/p/16597965.html

相关文章