命令行中缺少DSO [英] DSO missing from command line
问题描述
我想编译一个c ++程序。
I am trying to compile a c++ program.
g++ -o Sniffer_Train main.cpp Sniffer_train.cpp Sniffer_train.h
-lmysqlclient -lpcap
但是,我得到以下错误:
However i get the following error :
/ usr / bin / ld:/tmp/cct6xeXD.o:未定义引用符号
'pthread_join @@ GLIBC_2.4'//lib/arm-linux-gnueabihf/libpthread.so.0:
错误添加符号:命令行中缺少DSO
/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:错误:ld返回1退出状态
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屋!