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>
&lt;&nbsp;&nbsp;&nbsp;&nbsp; LIBS="-lxerces-c1_6_0 -lpthread $LIBS"<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp; if test -f /usr/local/lib/libxerces-c1_6_0.so ; then<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBS="-L/usr/local/lib $LIBS"<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; LIBS="-lxerces-c -lpthread $LIBS"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # was&nbsp;
LIBS="-lxerces-c1_6_0"<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; if test -f /usr/local/xerces-c-2_3_0/lib/libxerces-c.so.23.0 ;
then<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBS="-L/usr/local/xerces-c-2_3_0/lib $LIBS"<br>
21084,21085c21084,21085<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp; if test -d /usr/local/include/xercesc ; then<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XERCES_INCLUDE="-I/usr/local/include/xercesc"<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; if test -d /usr/local/xerces-c-2_3_0 ; then<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XERCES_INCLUDE="-I/usr/local/xerces-c-2_3_0/include"<br>
21091c21091,21096<br>
&lt;&nbsp;&nbsp; echo '#include &lt;util/PlatformUtils.hpp&gt;' &gt; conftest.cpp<br>
---<br>
&gt;&nbsp;&nbsp; # Xerces-C++ 2.3.0 now supports C++ Namespace.<br>
&gt;&nbsp;&nbsp; # From doc/html/program-others.html#CPPNamespace<br>
&gt;&nbsp;&nbsp; echo '#include &lt;xercesc/util/PlatformUtils.hpp&gt;' &gt;
conftest.cpp<br>
&gt;&nbsp;&nbsp; echo '#include &lt;xercesc/sax/HandlerBase.hpp&gt;' &gt;&gt;
conftest.cpp<br>
&gt;&nbsp;&nbsp; echo '#define XERCES_HAS_CPP_NAMESPACE' &gt;&gt; conftest.cpp<br>
&gt;&nbsp;&nbsp; echo 'using namespace xercesc;' &gt;&gt; conftest.cpp<br>
<br>
I also modified ogr/ogrsf_frmts/gml/gmlreaderp.h&nbsp; (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>
&lt; #include &lt;util/PlatformUtils.hpp&gt;<br>
&lt; #include &lt;sax2/DefaultHandler.hpp&gt;<br>
&lt; #include &lt;sax2/ContentHandler.hpp&gt;<br>
&lt; #include &lt;sax2/SAX2XMLReader.hpp&gt;<br>
&lt; #include &lt;sax2/XMLReaderFactory.hpp&gt;<br>
---<br>
&gt; #include &lt;xercesc/util/PlatformUtils.hpp&gt;<br>
&gt; #include &lt;xercesc/sax2/DefaultHandler.hpp&gt;<br>
&gt; #include &lt;xercesc/sax2/ContentHandler.hpp&gt;<br>
&gt; #include &lt;xercesc/sax2/SAX2XMLReader.hpp&gt;<br>
&gt; #include &lt;xercesc/sax2/XMLReaderFactory.hpp&gt;<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