Symbols with the addition of errors: DSO is not on the command line

Trying to use Ogre in a Qt project. The ogre is being built successfully. Running the project gives me three errors:

/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' 

When I searched for the error, it says that it is editing the makefile and adding: LIBS = -lpthread

but it already exists.

How to resolve this error?

+7
c ++ qt ogre
source share
2 answers

You need to link the boost library in your project.

Add LIBS += -lboost_system to the pro pro file of the project.

+15
source share

In my case: I am using IDE code blocks and have the same error. I allow this as shown below:

  • In the IDE code blocks goto settings> compiler.
  • On the Linker Settings tab, add the path: /usr/lib/x86_64-linux-gnu/libboost_system.so

Now create your program again.

Hope this will be helpful.

0
source share

All Articles