Hello all,
I have the same problem with OSG 2.2.0 or 2.3.6, collada plugin and collada 1.4
dom 1.3.
I've search on collada forum and found 2 things :
1- in the collada_dom source, dae directory, edit the Makefile_PC to add
daeRawResolver.cpp and compile as usual.
COLLADA_DOM/src/dae/Makefile_PC:
[...]
# files
SRC := dae.cpp \
daeArray.cpp \
daeAtomicType.cpp \
daeDocument.cpp \
daeDom.cpp \
daeElement.cpp \
daeError.cpp \
daeErrorHandler.cpp \
daeIDRef.cpp \
daeMemorySystem.cpp \
daeMetaAny.cpp \
daeMetaAttribute.cpp \
daeMetaChoice.cpp \
daeMetaCMPolicy.cpp \
daeMetaElement.cpp \
daeMetaElementAttribute.cpp \
daeMetaGroup.cpp \
daeMetaSequence.cpp \
======> file to add daeRawResolver.cpp \
daeSIDResolver.cpp \
daeStringRef.cpp \
daeStringTable.cpp \
daeURI.cpp \
domAny.cpp
[...]
2- in OpenSceneGraph-build-tree/src/osgPlugins/dae/CMakeFiles/osgdb_dae.dir
directory you have a file named
"link.txt". This file contains the link command to produce osgdb_dae.so from
all object file. For some reasons all the
collada the collada libraries are not here. So I modified this file and run it
to produce a new osgdb_dae.so which works
fine (no more undefined symbol).
old build-U7.04_32/src/osgPlugins/dae/CMakeFiles/osgdb_dae.dir/link.txt:
/usr/bin/c++ -fPIC -O3 -DNDEBUG -shared -Wl,-soname,osgdb_dae.so -o
../../../lib/osgPlugins-2.3.6/osgdb_dae.so
"CMakeFiles/osgdb_dae.dir/daeReader.o"
"CMakeFiles/osgdb_dae.dir/daeRGeometry.o"
"CMakeFiles/osgdb_dae.dir/daeRMaterials.o"
"CMakeFiles/osgdb_dae.dir/daeRSceneObjects.o"
"CMakeFiles/osgdb_dae.dir/daeRTransforms.o"
"CMakeFiles/osgdb_dae.dir/daeWGeometry.o"
"CMakeFiles/osgdb_dae.dir/daeWMaterials.o"
"CMakeFiles/osgdb_dae.dir/daeWriter.o"
"CMakeFiles/osgdb_dae.dir/daeWSceneObjects.o"
"CMakeFiles/osgdb_dae.dir/daeWTransforms.o"
"CMakeFiles/osgdb_dae.dir/domSourceReader.o"
"CMakeFiles/osgdb_dae.dir/ReaderWriterDAE.o" -LSOMEPATH -lOpenThreads -losg
-losgDB -losgUtil -lcollada_dom -lcollada_dae -lxml2 -lpcrecpp -Wl,-Bstatic
-lcollada_dom -Wl,-Bdynamic -losg -lm
-lOpenThreads -lpthread -lGLU -lGL -lSM -lICE -lX11 -lXext -Wl,-rpath,SOMEPATH
new command to build osgdb_dae.so:
/usr/bin/c++ -fPIC -O3 -DNDEBUG -shared -Wl,-soname,osgdb_dae.so -o
osgdb_dae.so *.o -LSOMEPATH -lOpenThreads -losg
-losgDB -losgUtil -lcollada_dae -lcollada_dom -lcollada_dae
-lcollada_STLDatabase -lcollada_stdErrPlugin
-lcollada_LIBXMLPlugin -lxml2 -Wl,-Bstatic -lcollada_dom -Wl,-Bdynamic -losg
-lm -lOpenThreads -lpthread -lGLU -lGL
-lSM -lICE -lX11 -lXext -Wl,-rpath,SOMEPATH
note that -lcollada_dae is include twice as specified in collada forum.
I'm sure it is possible to modify CMAKE to do the right things, but I'm not
CMAKE fluent and it is scheduled that all
this will die with collada DOM 2.0 and OSG 2.4.
Hope this will work for you,
Johan.
skunkwerk a écrit :
> thanks Jason,
> here's the output - it seems that it eventually finds the plugin, but
> dlopen complains about an undefined symbol in the osgdb_dae.so file -
> how can I fix this?
>
> RegisterWindowingSystemInterfaceProxy()
> X11WindowingSystemInterface()
> GraphicsContext::setWindowingSystemInterface() 0x8063520 0xb7f44bd0
> itr='/usr/lib/'
> FindFileInPath() : trying /usr/lib/osgdb_dae ...
> itr='/usr/local/lib/'
> FindFileInPath() : trying /usr/local/lib/osgdb_dae ...
> DynamicLibrary::getLibraryHandle( osgdb_dae) - dlopen(): ./osgdb_dae:
> cannot open shared object file: No such file or directory
> DynamicLibrary::failed loading "osgdb_dae"
> itr='/usr/lib/'
> FindFileInPath() : trying /usr/lib/osgPlugins-2.2.0/osgdb_dae.so ...
> itr='/usr/local/lib/'
> FindFileInPath() : trying /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so ...
> FindFileInPath() : USING /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so
> DynamicLibrary::getLibraryHandle(
> /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so) - dlopen():
> /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so: undefined symbol:
> _ZN15daeLIBXMLPluginC1Ev
> DynamicLibrary::failed loading "osgPlugins-2.2.0/osgdb_dae.so"
> Warning: Could not find plugin to read objects from file
> "/home/imran/3d/3dwarehouse/45/models/45.dae".
> Error no data loaded.
> ~RegisterWindowingSystemInterfaceProxy()
> GraphicsContext::setWindowingSystemInterface() 0 0xb7f44bd0
>
> appreciate it
>
> On Mon, Mar 24, 2008 at 8:28 AM, Jason Daly <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> skunkwerk wrote:
> > thanks Jason, once I ran ccmake . I was able to configure the
> > environment variables correctly.
> > the plugin seems to have been installed to
> > /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so
> > yet I can't get osgconv to find it - i've tried -e dae, -l osgdb_dae,
> > -l /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so but none of them
> > work. how do i get osgconv to load the library?
>
> You might need to set your OSGNOTIFY environment variable to DEBUG and
> see why osgconv isn't finding it.
>
> --"J"
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
Johan Nouvel, R&D Project Manager
http://www.archivideo.com
tel : +33 (0)2 99 86 30 20
ARCHIVIDEO, 40 rue des Veyettes, 35000 RENNES, FRANCE
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org