命令行中缺少 DSO [英] DSO missing from command line

查看:47
本文介绍了命令行中缺少 DSO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译这样的 C++ 程序:

I am trying to compile a C++ program like this:

$ g++ -o Sniffer_Train main.cpp Sniffer_train.cpp Sniffer_train.h -lmysqlclient -lpcap

但是我收到以下错误:

/usr/bin/ld: /tmp/cct6xeXD.o: undefined reference to symbol
'pthread_join@@GLIBC_2.4' //lib/arm-linux-gnueabihf/libpthread.so.0:
error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status

我不知道这个错误是什么意思.任何帮助将不胜感激.

I have no idea what this error means. Any help will be greatly appreciated.

推荐答案

DSO 这里的意思是动态共享对象;由于错误消息说命令行中缺少它,我想您必须将其添加到命令行中.

DSO here means Dynamic Shared Object; since the error message says it's missing from the command line, I guess you have to add it to the command line.

也就是说,尝试将 -lpthread 添加到您的命令行中.

That is, try adding -lpthread to your command line.

这篇关于命令行中缺少 DSO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆