在编译curl相关的应用的时候,GCC报错,提示找不到libpthread.so.0
mips-linux-gnu-gcc curl_ftp.c -L../../../buildroot/output/staging/usr/lib -lpthread -lz -lcurl -lcrypto -lssl -Wall -I/home/hhp/x2000/x2000_v5.0/buildroot/output/staging/usr/include -O2 -o test
/home/hhp/x2000/x2000_v5.0/prebuilts/toolchains/mips-gcc720-glibc226/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: cannot find /lib/libpthread.so.0
/home/hhp/x2000/x2000_v5.0/prebuilts/toolchains/mips-gcc720-glibc226/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: cannot find /usr/lib/libpthread_nonshared.a
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'test' failed
make: *** [test] Error 1
因为curl_ftp.c应用需要libcurl.so,我的curl是通过buildroot编译出来的,所以通过 -L../../../buildroot/output/staging/usr/lib指定一下libcurl.so所在路径,但是只要指定这个路径就会报错,找不到libpthread.so.0,
进入到../../../buildroot/output/staging/usr/lib目录发现也存在libpthread.so.0,因为-L指定了路径,编译器直接使用了../../../buildroot/output/staging/usr/lib/libpthread.so.0,而这个so是一个错误的动态库,只是一个简单的文本。
[email protected]:~/x2000/x2000_v5.0/buildroot/output/staging/usr/lib$ ls -l libpthread*
-rw-r--r-- 1 hhp hhp 387982 1月 15 09:17 libpthread.a
-rw-r--r-- 1 hhp hhp 1676 1月 15 09:17 libpthread_nonshared.a
-rw-r--r-- 1 hhp hhp 226 1月 15 09:17 libpthread.so
[email protected]:~/x2000/x2000_v5.0/buildroot/output/staging/usr/lib$ cat libpthread.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-tradlittlemips)
GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )
[email protected]:~/x2000/x2000_v5.0/buildroot/output/staging/usr/lib$
[email protected]:~/x2000/x2000_v5.0/buildroot/output/staging/usr/lib$
[email protected]:~/x2000/x2000_v5.0/buildroot/output/staging/usr/lib$
[email protected]:~/x2000/x2000_v5.0/buildroot/output/staging/usr/lib$
使用-L../../../buildroot/output/target/usr/lib下面的库进行编译,这个路径下的库也是buildroot生成的,区别是都是动态库并且没有其他乱七八糟的文件
mips-linux-gnu-gcc curl_ftp.c -L../../../buildroot/output/target/usr/lib -lpthread -lz -lcurl -lcrypto -lssl -Wall -I/home/hhp/x2000/x2000_v5.0/buildroot/output/staging/usr/include -O2 -o test
本文介绍高熵合金FeNiCrCoCu纳米压痕的案例代码。主要模拟过程:1. 建模FeNiCrCoCu合金比例为1:1:1:1:1,以Fe晶格为基础建立基体,使用set type/ratio命令按比例替换为其他原子。需要注意的是set type/ratio为lammps新命令,在老版本的lammps中可能无法识别,如果提示set type/ratio命令错误,安装新版本lammps即可。2. 合金化过程FeNiCrCoCu合金模型建好之后,可进行3000K的高温融化,随后冷却至室温300K,充分
1 引言5G网络是当前移动网络领域最热门的概念之一,“万物互联”的愿景和助力产业升级的目标使5G的研究和商用部署的节奏不断加快。而随着3GPP SA2第124次会议的闭幕,也宣告了Rel-15阶段的工作胜利完成,5G核心网正式完成了第一阶段架构的设计,商用产品的研发、试验和网络的商用部署工作即将大规模铺开。5G的商用部署进程将是一个基于4G系统进行的长期的替换、升级、迭代的过程,而在5G网...
Unreal + Vive套件制作实时动捕
词云图是一种为了文本数据的视觉表示,由词汇组成类似云的彩色图形,当需要统计文本中出现词汇的规模大小时,我们可以使用此类图形。本文将介绍如何用python代码制作词云图。
1、前言最近看代码,看到一个函数前面用__attribute__((constructor))修饰,搜了整个程序,没发现哪个地方调用这个函数。如下:__attribute__((constructor)) void load_file(){ printf("Constructor is called.\n"); g_count = (int *)malloc(sizeof(int));}2、__attribute__介绍__attribute__可以设置函数属性(Fun...
itshare持续更新,免费的IT计算机学习资源分享,包括IT书籍,社区,课程,解决方案,牛人等等也欢迎各位兄弟反馈和提供资源,我们就是要Share!github(一手资源):https://github.com/sunyuanSoftware/itshare目录免费IT学习社区慕课网: www.imooc.com极客学院: www.jikexueyuan.com麦子学院: www.maizi
一、FB数据库操作类如下:import java.io.ByteArrayInputStream;import java.sql.*;import org.firebirdsql.jdbc.*;public class DataBaseOperation{private java.sql.Connection Connection;public static int TEST_ROW_COUNT...
1.构造函数C++中有这么一种特殊的函数,它在类里,与类名同名,且没有返回值的一个函数,只要我们定义一个类的对象,系统就会自动调用它,进行专门的初始化对象用,而大多数情况下,因为我们没有定义构造函数,系统会默认生成一个默认形式、隐藏着的构造函数,这个构造函数的函数体是空着的,因此不具有任何功能。那么下来,我们将教大家如何定义自己的构造函数,需要用户自行定义了至少一个构造函数,系统就不在自动生成...
4.0.0 com.lrlz lrlz-platform 0.0.1-SNAPSHOT pom nexus-releases Local Nexus Repository http://oa.lrlz.com:8081/nexus/content/repositories/releases thirdp
1 Container Database (CDB)对于CDB,启动和关闭与之前传统的方式一样,具体语法如下:STARTUP[NOMOUNT | MOUNT | RESTRICT | UPGRADE | FORCE | READ ONLY]SHUTDOWN[IMMEDIATE | ABORT]要注意,在12c数据库创建完成后,默认情况下使用sqlplus / as sysdba ...
解决方法:用count去替换per_page即可原因是:GetSearch()函数没有变量per_page,改为了count变量
做室内定位的程序员应该都知道,在Android 5.0之后,google推出了蓝牙扫描新接口,我们在实测中发现出一些问题,现在给大家列出,以供参考:1.android 4.3.1(Build.VERSION_CODES.JELLY_BEAN_MR2)增加的startLeScan(callback)方法,官方在5.0之后不建议使用,实测此方法,4.3至目前6.0版本还是很稳定的,毫...