Solved

Linking Error on Solaris

Posted on 2003-11-09
1
318 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 250 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now