添加符号时出错:命令行中缺少DSO

error adding symbols: DSO missing from command line

本文关键字:DSO 命令行 符号 出错 添加      更新时间:2023-10-16

尝试在Qt项目中使用Ogre。Ogre建造成功。运行该项目时,它给了我三个错误:

/usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0:-1: error: error adding symbols: DSO missing from command line
-1: error: main.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'

当我搜索错误时,它显示要编辑makefile并添加:LIBS=-l线程

但它已经存在了。

如何解决此错误?

您需要在项目中链接boost库。

在项目的专业文件中添加LIBS += -lboost_system

在我的情况下:我正在使用代码块IDE,并且出现了相同的错误。我将其解析如下:

  • 在代码块中,IDE转到设置>编译器
  • 在"链接器设置"选项卡下添加路径:/usr/lib/x86_64-linux-gnu/librastrongystem.so

现在重新构建您的程序。

希望这是我们的全部。