title: Error during make: error adding symbols: DSO missing from command line
body: <p>I am trying to compile some code downloaded from a git repository (OpenNI2, <a href="https://github.com/occipital/OpenNI2" rel="nofollow noreferrer">https://github.com/occipital/OpenNI2</a>). I am getting the following errors after running make:</p>
  
  <pre><code>make -C Source/Tools/NiViewer
  make[1]: Entering directory `/home/karnivaurus/Data/Libraries/OpenNI2/Source/Tools/NiViewer'
  g++ -o ../../../Bin/x64-Release/NiViewer ./../../../Bin/Intermediate/x64-Release/NiViewer/Device.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Draw.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Keyboard.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Menu.o ./../../../Bin/Intermediate/x64-Release/NiViewer/MouseInput.o ./../../../Bin/Intermediate/x64-Release/NiViewer/NiViewer.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Capture.o -L../../../ThirdParty/PSCommon/XnLib/Bin/x64-Release -L../../../Bin/x64-Release -lglut -lGL -lOpenNI2 -lXnLib -Wl,-rpath ./
  /usr/bin/ld: ../../../ThirdParty/PSCommon/XnLib/Bin/x64-Release/libXnLib.a(XnLinuxMutex.o): undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
  //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
  collect2: error: ld returned 1 exit status
  make[1]: *** [../../../Bin/x64-Release/NiViewer] Error 1
  make[1]: Leaving directory `/home/karnivaurus/Data/Libraries/OpenNI2/Source/Tools/NiViewer'
  make: *** [Source/Tools/NiViewer] Error 2
  </code></pre>
  
  <p>Any ideas on how I should go about solving this?</p>