Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1352

Programming Guide - initialization sample is not compileable

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      The example for initializing the Xerces-API is not compileable using VC7 Compiler nor GCC 3.4.2, tested under Win32. The example should look like this:

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

      int main(int argc, char *argv[])
      {

      // Other include files, declarations, and non-Xerces-C++ initializations.

      try

      { XMLPlatformUtils::Initialize(); }

      catch (const XMLException& toCatch)

      { // Do your failure processing here return 1; }

      // Do your actual work with Xerces-C++ here.

      XMLPlatformUtils::Terminate();

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

      Note that the include is not within the main-function. Beside that, the XERCES_CPP_NAMESPACE_USE must now be used because of namespace support which is compiled in per default.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            noltec Christian Nolte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment