Hi everybody!
I'm using xercesc_2_8_0 with Eclipse 3.2.2. (added the
"xerces-c-src_2_8_0/include/" path into the Project)
I can run the samples but when I try to run the following code,
-----------------------------------------
#include <xercesc/util/PlatformUtils.hpp>

XERCES_CPP_NAMESPACE_USE

int main(int argc, char* argv[])
{
  try {
    XMLPlatformUtils::Initialize();
  }
  catch (const XMLException& toCatch) {
    return 1;
  }

  XMLPlatformUtils::Terminate();

  return 0;
}
----------------------------------------

I get this:

on "::Initialize()" line: "undefined reference to
'xercesc_2_8::fgXercescDefaultLocale'"
on "::Terminate()" line: "undefined reference to
'xercesc_2_8::XMLPlatformUtils::Terminate()'"

I tried to change it for this:

--------------------------------------------
#include <xercesc/util/PlatformUtils.hpp>

int main(int argc, char* argv[])
{
  try {
    xercesc::XMLPlatformUtils::Initialize();
  }
  catch (const XMLException& toCatch) {
    return 1;
  }

  xercesc::XMLPlatformUtils::Terminate();

  return 0;
}
--------------------------------------------

but unfortunally, I get the next errors:
on "catch" line: "ISO C++ forbids declaration of 'XMLException' with no type"


Thank you for your help.
Best regards.

Reply via email to