Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linking Error on Solaris

Posted on 2003-11-09
1
Medium Priority
?
331 Views
Last Modified: 2013-12-05
Hello

I am getting this error while proting code from windows to Solaris

Undefined                       first referenced
 symbol                             in file
xercesc_2_3::XMLUni::fgDOMNamespaces Doc.o
[Hint: static member xercesc_2_3::XMLUni::fgDOMNamespaces should be defined in the program ,see Annotated Reference Manual (ARM) Section 9.4]

The code causing the error:
xercesc::DOMBuilder* CDoc::GetBuilder()
{
      if (sm_Builder == NULL)
      {
            sm_Builder = GetImplementationLS()->createDOMBuilder(xercesc::DOMImplementationLS::MODE_SYNCHRONOUS,0);

            if (sm_Builder == NULL)
                  throw CXmlException(CXmlException::eError1,"Could not create xercesc::DOMBuilder");

*****            sm_Builder->setFeature(xercesc::XMLUni::fgDOMNamespaces, true);            ******
      }

      return sm_Builder;
}
0
Comment
Question by:arabolla
1 Comment
 
LVL 6

Accepted Solution

by:
GaryFx earned 750 total points
ID: 9709601
How are you linking your code?

Check out this item in the Xerces FAQ:  http://xml.apache.org/xerces-c/faq-build.html#faq-6 , entitled "Why does my application gives unresolved linking errors?"

The message you quoted is saying that you're missing a definition for a Xerces object, namely XMLUni::fgDOMNamespaces.  The most common cause of a missing symbol from a library is failure to include the appropriate library on the link line.  The Xerces faq indicates that other common mistakes are having the wrong version of the library, and namespace problems.  According to the faq, prebuilt binaries have namespaces turned on, but if you built Xerces yourself, it's possible you built it without namespaces.

Gary


0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question