Title: a program using c++ api's does not compile on linux 6.1

hi!
  I have recently downloaded an xercesc parser on Red Hat Linux 6.1
in the examples of programming for SAX there is an example that i
tried to compile using g++
the code is

#include <stdlib.h>
#include <string.h>
#include <iostream.h>
#include <util/PlatformUtils.hpp>
#include <parsers/SAXParser.hpp>
//#include "SAXCountHandlers.hpp"



main ()
 {
    try {
             XMLPlatformUtils::Initialize();
         }
         catch (const XMLException& toCatch) {
                 cout << "Error during initialization! :\n"
                  << toCatch.getMessage() << "\n";
          return 1;
        }

}

it gives me the following error


g++ a1.cpp -I/root/xerces-c_1_1_0-linux/include      
/tmp/cc2w3B7T.o: In function `main':
/tmp/cc2w3B7T.o(.text+0xa): undefined reference to `XMLPlatformUtils::Initialize(void)'
/tmp/cc2w3B7T.o(.text+0x2e): undefined reference to `SAXParser::SAXParser(XMLValidator *)'
/tmp/cc2w3B7T.o(.text+0x6d): undefined reference to `XMLException type_info function'
/tmp/cc2w3B7T.o(.text+0x9e): undefined reference to `XMLException::getMessage(void) const'
collect2: ld returned 1 exit status

can anyone please help me with this as i am unable to figure
out where i am making the mistake.

regards

anjana

Reply via email to