Stephanie,
I'm not sure exactly what your problem is, but here's a suggestion that may
help you narrow things down a bit. From your description, I assume that
you have some code that uses your PrintDOMTree function, and its when
linking that code you get the error. If your PrintDOMTree function is in a
DLL( BTW, I am assuming Windows, based on the link error you're getting. If
thats wrong, just ignore this entire message! ) use:
dumpbin /exports < your dll here >
to get a list of the symbols exported from the dll. If your Print.obj file
( compiled from Print.cpp ) is being linked with another obj file, use:
dumpbin /symbols Print.obj
Either way, you'll get a list of symbols. If you have to use the second
method, the list could be very long, since every variable, function, etc,
will be included. Which ever way you go, look through the list( I'd
suggest piping the output of the dumpbin to a file ) for your function.
Whatever name it got will include PrintDOMTree in it.
The point of all this is to determine the actual name the compiler
generates for the function, which is probably going to be different in some
way from the name in the unresolved external link error. Once you see what
the difference is, you might get a idea as to why they are different. And
change your code so the same symbols are used
Marc Robertson
Staff Consultant
AWD Development
DST Systems, Inc.
Stephanie L
Milchak
<[EMAIL PROTECTED] To
com> [EMAIL PROTECTED]
cc
12/23/2003 08:55
AM Subject
RE: Disabling C++ Namespace
Please respond to
[EMAIL PROTECTED]
apache.org
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
"Adam Heinz" <[EMAIL PROTECTED]>
To:
<[EMAIL PROTECTED]>
12/23/2003 09:49 AM cc:
Please respond to xerces-c-dev Subject: RE:
Disabling C++ Namespace
Well, if you look in the headers, the documentation is incorrect (just
submitted as bug 25727). Alberto suggested that you use:
XERCES_CPP_NAMESPACE_BEGIN
class InputSource;
XERCES_CPP_NAMESPACE_END
instead of
namespace xercesc {
class InputSource;
}
Adam Heinz
Development Consultant
Exstream Software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]