I think the problem doesn't lie in the
declaration of the function, but in its invocation. I suspect that you
have a non-XERCES_CPP_NAMESPACE:: forward declaration of DOM_Node somewhere and
that is causing the linker to look for PrintDOMTree(class DOM_Node instead of PrintDOMTree(class
XERCES_CPP_NAMESPACE::DOM_Node
Adam
Heinz
Development Consultant
Exstream Software
-----Original Message-----
From: Stephanie L Milchak [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 9:55 AM
To: [EMAIL PROTECTED]
Subject: RE: Disabling C++ Namespace
Okay, but I'm not having a problem with class InputSource... I'm still having the problem linking to a function that is defined in one of our hpp files.
In my header file, I have this statement:
char *PrintDOMTree(DOM_Node &domNode, int &nLength);
PrintDOMTree is defined in our Print.cpp file.
When using the xerces namespace, I get this error:
Utils.exp : error LNK2001: unresolved external symbol "char * __cdecl PrintDOMTree(class DOM_Node &,int &)" (?PrintDOMTree@@YAPADAAVDOM_Node@@[EMAIL PROTECTED])
When I use
XERCES_CPP_NAMESPACE_BEGIN
class InputSource;
XERCES_CPP_NAMESPACE_END
instead of
namespace xercesc {
class InputSource;
}
There is no difference, as is expected.
I can't understand why our interally defined PrintDOMTree is giving a linking error, even if I qualify DOM_Node to the xerces namespace.
Thanks,
Stephanie Milchak
Software Engineer
WebSphere Business Integration
Research Triangle Park, NC