0

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?

user1709708
  • 1,557
  • 2
  • 14
  • 27

1 Answers1

0

This might be the same error (read the whole thread): http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-October/017447.html

XenonofArcticus
  • 573
  • 2
  • 7
  • Hm...I don't fully understand the whole thing but in this case, it seems like a lot is caused by the CMake config. I'm just using an ordinary make file. Can I somehow view the contents of OpenThreads.so to check if this operater is defined at all? – user1709708 Dec 14 '12 at 10:51