Hi,

i tried the cmake file you attached. It is does what it is expected (building 
with libc++ and c++11 as language dialect).

But i think i mixed two things in here. First the linking error of OSG itself, 
which was not solved by linking against libc++. This was a problem of linking 
against OSG after it has been built. This was fixed when linking osg against  
libc++ which is now configurable using the flag mentioned by Stefan. So for me 
it makes sense to include the changes to osg.

Nevertheless, the issue with linking osgGA serializer plugin and the missing 
symbols is still there. I managed to build osg, but i am currently not able to 
reproduce this. I noticed that the build works once after cmake-ing osg via 
commandline (cmake .. -DCMAKE_PREFIX_PATH=/Users/jklimke/Qt/5.1.0/clang_64 
-DCMAKE_BUILD_TYPE=Release). But when trying to build a second time it refuses 
to link the osgga serializer. Is there anything special with this library ?

Here's again  the error i am getting with a more verbose output. All necessary 
libaries should be included in the link

Code:

Linking CXX shared module 
../../../../lib/osgPlugins-3.3.1/osgdb_serializers_osgga.so
cd 
/Users/jklimke/projects/metro-renderingserver-deployment/libs/osg/build/src/osgWrappers/serializers/osgGA
 && "/Applications/CMake 2.8-12.app/Contents/bin/cmake" -E cmake_link_script 
CMakeFiles/osgdb_serializers_osgga.dir/link.txt --verbose=1
/usr/bin/c++      -Wno-conversion -mmacosx-version-min=10.8 
-fvisibility-inlines-hidden -std=c++11 -stdlib=libc++  -Wno-conversion -O3 
-DNDEBUG -arch x86_64 -bundle -Wl,-headerpad_max_install_names   -o 
../../../../lib/osgPlugins-3.3.1/osgdb_serializers_osgga.so 
CMakeFiles/osgdb_serializers_osgga.dir/AnimationPathManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/DriveManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/FlightManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/GUIEventAdapter.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/KeySwitchMatrixManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/MultiTouchTrackballManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/StateSetManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/TerrainManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/TouchData.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/TrackballManipulator.cpp.o 
CMakeFiles/osgdb_serializers_osgga.dir/UFOManipulator.cpp.o ../../../../l
 ib/libOpenThreads.3.3.0.dylib ../../../../lib/libosg.3.3.1.dylib 
../../../../lib/libosgDB.3.3.1.dylib ../../../../lib/libosgUtil.3.3.1.dylib 
../../../../lib/libosgGA.3.3.1.dylib ../../../../lib/libosgDB.3.3.1.dylib 
-framework Carbon /usr/lib/libz.dylib ../../../../lib/libosgUtil.3.3.1.dylib 
../../../../lib/libosg.3.3.1.dylib ../../../../lib/libOpenThreads.3.3.0.dylib 
/usr/lib/libm.dylib /usr/lib/libdl.dylib -framework OpenGL
Undefined symbols for architecture x86_64:
  "osgGA::GUIEventHandler::~GUIEventHandler()", referenced from:
      construction vtable for 
osgGA::GUIEventHandler-in-osgGA::KeySwitchMatrixManipulator in 
KeySwitchMatrixManipulator.cpp.o
  "osgGA::GUIEventHandler::~GUIEventHandler()", referenced from:
      construction vtable for 
osgGA::GUIEventHandler-in-osgGA::KeySwitchMatrixManipulator in 
KeySwitchMatrixManipulator.cpp.o
  "non-virtual thunk to osgGA::GUIEventHandler::~GUIEventHandler()", referenced 
from:
      construction vtable for 
osgGA::GUIEventHandler-in-osgGA::KeySwitchMatrixManipulator in 
KeySwitchMatrixManipulator.cpp.o
  "non-virtual thunk to osgGA::GUIEventHandler::~GUIEventHandler()", referenced 
from:
      construction vtable for 
osgGA::GUIEventHandler-in-osgGA::KeySwitchMatrixManipulator in 
KeySwitchMatrixManipulator.cpp.o
  "non-virtual thunk to osgGA::GUIEventHandler::~GUIEventHandler()", referenced 
from:
      construction vtable for 
osgGA::GUIEventHandler-in-osgGA::KeySwitchMatrixManipulator in 
KeySwitchMatrixManipulator.cpp.o
  "non-virtual thunk to osgGA::GUIEventHandler::~GUIEventHandler()", referenced 
from:
      construction vtable for 
osgGA::GUIEventHandler-in-osgGA::KeySwitchMatrixManipulator in 
KeySwitchMatrixManipulator.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/osgPlugins-3.3.1/osgdb_serializers_osgga.so] Error 1
make[1]: *** [src/osgWrappers/serializers/osgGA/CMakeFiles/osgd




Thank you!

Cheers,
Jan[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=56895#56895





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to