I'm having trouble getting OSG/OpenThreads to work in a simple sample application. That's what my command looks like:
g++ bAuto.o -o bAuto -lGL -lGLU -lstdc++ -losgSim -losgText -losgGA -losgParticle -losgDB -losgViewer -losgUtil -losg -lGLU -lGL -lOpenThreads -L/opt/xfree86/default/lib -L/media/Programme/dev/cpp_libs/OpenSceneGraph/OpenSceneGraph-3.0.1-Ubuntu-x64-release-12741/lib64
bAuto.o: In function `osg::Referenced::unref() const':
bAuto.cpp:(.text._ZNK3osg10Referenced5unrefEv[osg::Referenced::unref() const]+0xd): undefined reference to `OpenThreads::Atomic::operator--()'
So I linked with OpenThreads and it definitely is in the lib64 folder. If I remove the link dependency it throws way more linker errors to functions in OpenThreads. What am I missing? I also tried the x86 version but then it tells me that all the other libs are incompatible and thus can't be found. My system is x64 but shouldn't it be backwards compatible?