check the lib name in the installation upgrade path (default: / usr / lib /), if it is libboost_thread.so, add -lboost_thread. Remember to specify the path to format the directory with -L / usr / lib / boost. If it works only with root privileges, check your privilege in this directory:
ls -la /usr/lib/ | grep boost
you should see your username and rw_r_r_ (make sure you have read permission).
If you have this permission in the directory and in boost lib, you can link to gcc:
g++ obj.o obj2.o -L/usr/lib -lboost_thread
if you do not have files or you do not have read permissions, log in with administrator rights and add them
chown -R /usr/lib <your login> chmod +r /usr/lib/lib*.so
source share