I just tried to build collada dom on a debian linux machine and ran into a whole lot of problems. first the g++ version i use:
g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)
Copyright © 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
since my libxml2 is not in /usr/lib i changed the directory in ./src/dae/Makefile_PC and ./src/modules/LIBXMLPlugin/Makefile_PC to the directory where i have libxml2.
trying to build the latest subversion checkout i get the following errors on make:
make
make[1]: Entering directory /scratch/gabriel/colladaDom_trunk/src/1.4/dom' building ../../../lib-dbg/libcollada_dom.a - linux Debug "g++" -c domAccessor.cpp -c -g -D"_DEBUG" -o../../../tmp/linux/Debug/dom/domAccessor.o -I ../../../include/ -I ../../../include/1.4/ In file included from ../../../include/dae/daeDomTypes.h:17, from ../../../include/1.4/dom/domTypes.h:17, from ../../../include/1.4/dom/domAccessor.h:16, from domAccessor.cpp:15: ../../../include/dae/daeElement.h:27: error: use of enum
TypeEnum’ without
previous declaration
…/…/…/include/dae/daeElement.h:27: error: declaration does not declare
anything
…/…/…/include/dae/daeElement.h:355: error: ISO C++ forbids declaration of TypeEnum' with no type ../../../include/dae/daeElement.h:355: error: invalid use of
::’
…/…/…/include/dae/daeElement.h:355: error: TypeEnum' declared as a
virtual’ field
…/…/…/include/dae/daeElement.h:355: error: parse error before (' token ../../../include/dae/daeElement.h:360: error: ISO C++ forbids defining types within return type ../../../include/dae/daeElement.h:360: error: syntax error before
(’ token
…/…/…/include/dae/daeElement.h:367: error: non-member function const char* getElementName()' cannot have
const’ method qualifier
…/…/…/include/dae/daeElement.h:381: error: non-member function const char* getID()' cannot have
const’ method qualifier
…/…/…/include/dae/daeElement.h:403: error: parse error before public' ../../../include/dae/daeElement.h:416: error: parse error before
public’
…/…/…/include/dae/daeElement.h:441: error: parse error before }' token In file included from ../../../include/dae/daeDomTypes.h:20, from ../../../include/1.4/dom/domTypes.h:17, from ../../../include/1.4/dom/domAccessor.h:16, from domAccessor.cpp:15: ../../../include/dae/daeSmartRef.h: In copy constructor
daeSmartRef<T>::daeSmartRef(const daeSmartRef<T>&) [with T = daeElement]’:
…/…/…/include/dae/daeURI.h:215: instantiated from here
…/…/…/include/dae/daeSmartRef.h:67: error: no matching function for call to
daeElement::ref(const daeElement*&)' ../../../include/dae/daeElement.h:106: error: candidates are: void daeElement::ref() const ../../../include/dae/daeSmartRef.h: In destructor
daeSmartRef<T>::~daeSmartRef() [with T = daeElement]’:
…/…/…/include/dae/daeURI.h:215: instantiated from here
…/…/…/include/dae/daeSmartRef.h:38: error: no matching function for call to
daeElement::release(daeElement*)' ../../../include/dae/daeElement.h:99: error: candidates are: void daeElement::release() const ../../../include/dae/daeSmartRef.h: In constructor
daeSmartRef<T>::daeSmartRef(const daeSmartRef<U>&) [with U = daeElement, T =
const daeElement]’:
…/…/…/include/dae/daeURI.h:221: instantiated from here
…/…/…/include/dae/daeSmartRef.h:54: error: no matching function for call to
daeElement::ref(const daeElement*)' ../../../include/dae/daeElement.h:106: error: candidates are: void daeElement::ref() const ../../../include/dae/daeSmartRef.h: In destructor
daeSmartRef<T>::~daeSmartRef() [with T = const daeElement]’:
…/…/…/include/dae/daeURI.h:221: instantiated from here
…/…/…/include/dae/daeSmartRef.h:38: error: no matching function for call to
daeElement::release(daeElement*&)' ../../../include/dae/daeElement.h:99: error: candidates are: void daeElement::release() const ../../../include/dae/daeSmartRef.h: In copy constructor
daeSmartRef<T>::daeSmartRef(const daeSmartRef<T>&) [with T = const
daeElement]’:
…/…/…/include/dae/daeURI.h:221: instantiated from here
…/…/…/include/dae/daeSmartRef.h:67: error: no matching function for call to
daeElement::ref(const daeElement*)' ../../../include/dae/daeElement.h:106: error: candidates are: void daeElement::ref() const ../../../include/dae/daeURI.h: In member function
daeElementConstRef
daeURI::getElement() const’:
…/…/…/include/dae/daeURI.h:221: error: initializing temporary from result
of daeSmartRef<T>::daeSmartRef(const daeSmartRef<U>&) [with U = daeElement, T = const daeElement]' ../../../include/dae/daeSmartRef.h: In member function
const daeSmartRef<T>&
daeSmartRef<T>::operator=(const daeSmartRef<T>&) [with T = daeElement]’:
…/…/…/include/dae/daeURI.h:227: instantiated from here
…/…/…/include/dae/daeSmartRef.h:107: error: no matching function for call to
daeElement::ref(const daeElement*&)' ../../../include/dae/daeElement.h:106: error: candidates are: void daeElement::ref() const ../../../include/dae/daeSmartRef.h:108: error: no matching function for call to
daeElement::release(const daeElement*&)’
…/…/…/include/dae/daeElement.h:99: error: candidates are: void
daeElement::release() const
…/…/…/include/dae/daeSmartRef.h: In constructor daeSmartRef<T>::daeSmartRef(T*) [with T = domAccessor]': domAccessor.cpp:26: instantiated from here ../../../include/dae/daeSmartRef.h:74: error: no matching function for call to
daeElement::ref(const daeElement*&)’
…/…/…/include/dae/daeElement.h:106: error: candidates are: void
daeElement::ref() const
…/…/…/include/dae/daeSmartRef.h: In destructor daeSmartRef<T>::~daeSmartRef() [with T = domAccessor]': domAccessor.cpp:26: instantiated from here ../../../include/dae/daeSmartRef.h:38: error: no matching function for call to
daeElement::release(daeElement*&)’
…/…/…/include/dae/daeElement.h:99: error: candidates are: void
daeElement::release() const
…/…/…/include/dae/daeSmartRef.h: In copy constructor daeSmartRef<T>::daeSmartRef(const daeSmartRef<T>&) [with T = domAccessor]': domAccessor.cpp:26: instantiated from here ../../../include/dae/daeSmartRef.h:67: error: no matching function for call to
daeElement::ref(const daeElement*&)’
…/…/…/include/dae/daeElement.h:106: error: candidates are: void
daeElement::ref() const
…/…/…/include/dae/daeSmartRef.h: In constructor daeSmartRef<T>::daeSmartRef(const daeSmartRef<U>&) [with U = domAccessor, T = daeElement]': domAccessor.cpp:28: instantiated from here ../../../include/dae/daeSmartRef.h:54: error: no matching function for call to
daeElement::ref(const daeElement*&)’
…/…/…/include/dae/daeElement.h:106: error: candidates are: void
daeElement::ref() const
…/…/…/include/dae/daeSmartRef.h: In destructor daeSmartRef<T>::~daeSmartRef() [with T = domParam]': ../../../include/dae/daeArray.h:153: instantiated from
void daeTArray<T>::clear() [with T = domParamRef]’
…/…/…/include/dae/daeArray.h:144: instantiated from daeTArray<T>::~daeTArray() [with T = domParamRef]' ../../../include/1.4/dom/domAccessor.h:128: instantiated from here ../../../include/dae/daeSmartRef.h:38: error: no matching function for call to
daeElement::release(daeElement*&)’
…/…/…/include/dae/daeElement.h:99: error: candidates are: void
daeElement::release() const
make[1]: *** […/…/…/tmp/linux/Debug/dom/domAccessor.o] Error 1
make[1]: Leaving directory `/scratch/gabriel/colladaDom_trunk/src/1.4/dom’
make: *** [src/1.4/dom] Error 2
==========
revision 41 is the most recent one that builded on my system. with this though i get some errors compiling my app. the makefile includes lxml2, include, include/1.4 and the libs like: -lcollada_dom -lcollada_dae -lcollada_LIBXMLPlugin -lcollada_stdErrPlugin -lcollada_STLDatabase -lxml2.
set up like this the error is (much smaller already ):
make
g++ -o …/debug/TE_GUI main.o te_gui.o colladaLoader.o drawNode.o node.o edge.o graphwidget.o moc_te_gui.o moc_graphwidget.o -L/usr/local/Trolltech/Qt-4.2.1/lib -L/usr/X11R6/lib -L/usr/pack/libxml2-2.6.19-mo/i686-debian-linux3.1/lib -L…/…/…/collada_dom_r40/lib-dbg -L/scratch/gabriel/qt-x11-opensource-src-4.2.1/lib -lcollada_dom -lcollada_dae -lcollada_LIBXMLPlugin -lcollada_stdErrPlugin -lcollada_STLDatabase -lxml2 -lQtXml -lQtOpenGL -L/usr/X11R6/lib -lQtGui -lSM -lICE -lXi -lXrender -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtNetwork -lQtCore -lz -lm -ldl -lGLU -lGL -lpthread
…/…/…/collada_dom_r40/lib-dbg/libcollada_dae.a(daeDom.o)(.text+0x7): In function initializeDomMeta()': /scratch/gabriel/collada_dom_r40/src/dae/daeDom.cpp:21: undefined reference to
registerDomTypes()’
…/…/…/collada_dom_r40/lib-dbg/libcollada_dae.a(daeDom.o)(.text+0xc):/scratch/gabriel/collada_dom_r40/src/dae/daeDom.cpp:23: undefined reference to `registerDomElements()’
collect2: ld returned 1 exit status
make: *** […/debug/TE_GUI] Error 1
==========
the app and collada dom work fine with windows, but i really need to get it to work under linux too…
thanks!