No subject
Wed Nov 21 11:48:46 EST 2007
<font color="#000000" face="arial,helvetica,sanserif">
<p>Xerces-C++ 2.3.0 now supports C++ Namespace.</p>
</font><font color="#000000" face="arial,helvetica,sanserif">- users'
applications must namespace qualified all the Xerces-C++
classes/data/variables with <code><font face="courier, monospaced">"xercesc::"</font></code>
or add the <code><font face="courier, monospaced">"using namespace
xercesc"</font></code> clause.<br>
<br>
So I modified configure so it would pass conftest...<br>
<br>
$ diff ../clean/configure ..modifiedl/configure<br>
21076,21078c21076,21078<br>
< LIBS="-lxerces-c1_6_0 -lpthread $LIBS"<br>
< if test -f /usr/local/lib/libxerces-c1_6_0.so ; then<br>
< LIBS="-L/usr/local/lib $LIBS"<br>
---<br>
> LIBS="-lxerces-c -lpthread $LIBS" # was
LIBS="-lxerces-c1_6_0"<br>
> if test -f /usr/local/xerces-c-2_3_0/lib/libxerces-c.so.23.0 ;
then<br>
> LIBS="-L/usr/local/xerces-c-2_3_0/lib $LIBS"<br>
21084,21085c21084,21085<br>
< if test -d /usr/local/include/xercesc ; then<br>
< XERCES_INCLUDE="-I/usr/local/include/xercesc"<br>
---<br>
> if test -d /usr/local/xerces-c-2_3_0 ; then<br>
> XERCES_INCLUDE="-I/usr/local/xerces-c-2_3_0/include"<br>
21091c21091,21096<br>
< echo '#include <util/PlatformUtils.hpp>' > conftest.cpp<br>
---<br>
> # Xerces-C++ 2.3.0 now supports C++ Namespace.<br>
> # From doc/html/program-others.html#CPPNamespace<br>
> echo '#include <xercesc/util/PlatformUtils.hpp>' >
conftest.cpp<br>
> echo '#include <xercesc/sax/HandlerBase.hpp>' >>
conftest.cpp<br>
> echo '#define XERCES_HAS_CPP_NAMESPACE' >> conftest.cpp<br>
> echo 'using namespace xercesc;' >> conftest.cpp<br>
<br>
I also modified ogr/ogrsf_frmts/gml/gmlreaderp.h (although not clear
why this was necessary using namespaces)<br>
<br>
diff ../clean/gdal/ogr/ogrsf_frmts/gml/gmlreaderp.h
../modified/gdal/ogr/ogrsf_frmts/gml/gmlreaderp.h<br>
64,68c64,68<br>
< #include <util/PlatformUtils.hpp><br>
< #include <sax2/DefaultHandler.hpp><br>
< #include <sax2/ContentHandler.hpp><br>
< #include <sax2/SAX2XMLReader.hpp><br>
< #include <sax2/XMLReaderFactory.hpp><br>
---<br>
> #include <xercesc/util/PlatformUtils.hpp><br>
> #include <xercesc/sax2/DefaultHandler.hpp><br>
> #include <xercesc/sax2/ContentHandler.hpp><br>
> #include <xercesc/sax2/SAX2XMLReader.hpp><br>
> #include <xercesc/sax2/XMLReaderFactory.hpp><br>
<br>
Not sure all this was necessary, (I'm not a big C++ coder) but its what
I needed to compile in support for Xerces 2.3.0 and GML and wanted some
place to document my modifications in the chance it can help someone
else...<br>
<br>
-jv<br>
</font>
</body>
</html>
--------------050202000900000104080708--
More information about the gdal-dev
mailing list