You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Michael J Magee <Mi...@sybase.com> on 2000/04/28 21:34:14 UTC
xerces-c_1.lib for Win32 MFC 5 ?
For a variety of reasons that I'd rather not dive into, I'm stuck with Visual
Studio 5.0 for now. It appears that the supplied xerces-c_1.lib is NOT backward
compatible to this level. The V5 Lib command dies trying to look at it. Does
anyone have a V5 version of it, or suggestions on how to build it with 5.0?
This is my first attempt at using the parser. I'd hate for it to stop here.
Thanks..
Re: xerces-c_1.lib for Win32 MFC 5 ?
Posted by Radovan Chytracek <Ra...@cern.ch>.
Andy Heninger wrote:
>
> ----- Original Message -----
> From: "Radovan Chytracek" <Ra...@cern.ch>
> [...]
> > Well, with the current source base it's not possible to build Xerces-C lib
> > in a straightforward way because VC++5.0 emits an error during compilation
> > at a few places saying that some control paths don't return a value.
> >
>
> If anyone has patches for these compilation problems on MSVC 5, I'd be more
> than happy to put them back into CVS.
Here is the diff of NodeImpl.cpp file which compiles without error using
MSVC++5.0 SP3 on NT/SP4.
Actually the change is that only the "return 0;" statements were added after
the throws in the
corresponding methods. I think this should not change the DOM control flow.
I assume that run-time
does not roll back after throwing the exceptions.
------------------------- cut here --------------------------------------
cvs diff NodeImpl.cpp (in directory D:\mycmt\xerces\xml-xerces\c\src\dom\)
Index: NodeImpl.cpp
===================================================================
RCS file: /home/cvspublic/xml-xerces/c/src/dom/NodeImpl.cpp,v
retrieving revision 1.23
diff -r1.23 NodeImpl.cpp
288c288,289
< NodeImpl *NodeImpl::insertBefore(NodeImpl *newChild, NodeImpl *refChild) {
---
> NodeImpl *NodeImpl::insertBefore(NodeImpl *newChild, NodeImpl *refChild)
> {
289a291
> return 0;
292c294,295
< NodeImpl *NodeImpl::item(unsigned int index) {
---
> NodeImpl *NodeImpl::item(unsigned int index)
> {
299a303
> return 0;
305a310
> return 0;
436c441,442
< return namespaceURI;
---
> return namespaceURI;
>
438,448c444,469
< if (namespaceURI.equals(xmlURI))
< return *s_xmlURI;
< throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
< } else if (nType == DOM_Node::ATTRIBUTE_NODE && prefix.equals(xmlns))
{
< if (namespaceURI.equals(xmlnsURI))
< return *s_xmlnsURI;
< throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
< } else if (namespaceURI == null || namespaceURI.length() == 0) {
< throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
< } else
< return namespaceURI;
---
>
> if (namespaceURI.equals(xmlURI)) {
> return *s_xmlURI;
> }
>
> throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
> return 0;
>
> }
> else if (nType == DOM_Node::ATTRIBUTE_NODE && prefix.equals(xmlns)) {
>
> if (namespaceURI.equals(xmlnsURI)) {
> return *s_xmlnsURI;
> }
>
> throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
> return 0;
>
> }
> else if (namespaceURI == null || namespaceURI.length() == 0) {
> throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
> return 0;
> }
> else {
> return namespaceURI;
> }
------------------------- cut here --------------------------------------
--
Radovan Chytracek LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch WWW: http://home.cern.ch/~chytrace
phone: +41 22 76 72486
Re: xerces-c_1.lib for Win32 MFC 5 ?
Posted by Radovan Chytracek <Ra...@cern.ch>.
Andy Heninger wrote:
>
> ----- Original Message -----
> From: "Radovan Chytracek" <Ra...@cern.ch>
> [...]
> > Well, with the current source base it's not possible to build Xerces-C lib
> > in a straightforward way because VC++5.0 emits an error during compilation
> > at a few places saying that some control paths don't return a value.
> >
>
> If anyone has patches for these compilation problems on MSVC 5, I'd be more
> than happy to put them back into CVS.
The errors one gets in MSVC++5.0 are:
xml-xerces\c\src\dom\NodeImpl.cpp(290) : error C2561: 'insertBefore' :
function must return a value
xml-xerces\c\src\dom\NodeImpl.cpp(300) : error C2561: 'removeChild' :
function must return a value
xml-xerces\c\src\dom\NodeImpl.cpp(306) : error C2561: 'replaceChild' :
function must return a value
For these 3 I looked into the code. It seems to me that these are ment to be
never called but instead should be overidden by derived classes to provide
real behaviour ( e.g. ChildNode and ParentNode classes). What is strange to
me is that a few methods defined as pure virtual are not implemented in
neither of the ChildNode and ParentNode classes, the methods are:
virtual DOMString getNodeName() = 0;
virtual short getNodeType() = 0;
declared in NodeImpl.hpp and these could be perhaps useful somewhere to
retrieve this sort of information.
xml-xerces\c\src\dom\NodeImpl.cpp(449) : error C2202: 'mapPrefix' : not all
control paths return a value
this one is more dificult to resolve. I don't have enough time tonight to
have a look at it in more detail but I will give it a try tomorrow.
Hope this helps to localize the problem.
Radovan
--
Radovan Chytracek LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch WWW: http://home.cern.ch/~chytrace
phone: +41 22 76 72486
Re: xerces-c_1.lib for Win32 MFC 5 ?
Posted by Andy Heninger <an...@jtcsv.com>.
----- Original Message -----
From: "Radovan Chytracek" <Ra...@cern.ch>
[...]
> Well, with the current source base it's not possible to build Xerces-C lib
> in a straightforward way because VC++5.0 emits an error during compilation
> at a few places saying that some control paths don't return a value.
>
If anyone has patches for these compilation problems on MSVC 5, I'd be more
than happy to put them back into CVS.
-- Andy
Re: xerces-c_1.lib for Win32 MFC 5 ?
Posted by Radovan Chytracek <Ra...@cern.ch>.
Rahul Jain wrote:
>
> AFAIK, there are no VC 6.0 specific features that are exploited by Xerces-C.
> So, I would suggest you look at the *.dsp files (these are text files) and
> create VC 5.0 project files for Xerces-C. Setting up these project files
> is all that you will need (hopefully!) to get going with VC 5.0.
>
> Maybe someone else on the list who has already setup VC 5.0 project files can
> send them to you.
>
Well, with the current source base it's not possible to build Xerces-C lib
in a straightforward way because VC++5.0 emits an error during compilation
at a few places saying that some control paths don't return a value.
One can't suppress this error. The only solution would be to modify source
code. I did this for XML4C 2.3.1 since there it was not too hard to do it
without breaking
control flow. In the current source base the code became more complex and I
did not want
to hack the code to make it compile.
BTW, VC++5.0 developer studio loads the workspace and project files without
problem for me,
but I have installed both VC++5.0 and VC++6.0 so it's not clear for me why
it works.
If somebody is interested I can provide the more info about that error.
Hope this helps
Radovan
--
Radovan Chytracek LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch WWW: http://home.cern.ch/~chytrace
phone: +41 22 76 72486
Re: xerces-c_1.lib for Win32 MFC 5 ?
Posted by Rahul Jain <ra...@jtcsv.com>.
AFAIK, there are no VC 6.0 specific features that are exploited by Xerces-C.
So, I would suggest you look at the *.dsp files (these are text files) and
create VC 5.0 project files for Xerces-C. Setting up these project files
is all that you will need (hopefully!) to get going with VC 5.0.
Maybe someone else on the list who has already setup VC 5.0 project files can
send them to you.
rahul