| Questions |

- Why do I get Internal Compiler Error when compiling Xerces-C++ for a 64bit target with gcc?
- Why do I get compilation error when compiling Xerces-C++ on FreeBSD with native transcoder?
- Building Xerces-C++ with compiler GCC 2.7.x or 2.8.x gives problem, what's wrong?
- Why does my application gives unresolved linking errors on Solaris?
- Why does my application gives unresolved linking errors on AIX?
- Why do I get link error saying icudata library not found when building with ICU?
- I cannot run the sample applications. What is wrong?
- Why does my application crash on AIX when I run it under a multi-threaded environment?
- Why does my multi-threaded application crash on Solaris 2.6?
- I just built my own application using the Xerces-C++ parser. Why does it crash?
- Why does deleting a transcoded string result in assertion on windows?
- Can't debug into the Xerces-C++ DLL with the MSVC debugger
- First-chance exception in Microsoft debugger
- Fatal Error: Cannot open include file: XXX: No such file or directory

| Why do I get Internal Compiler Error when compiling Xerces-C++ for a 64bit target with gcc? |

| This is a compiler problem. Try turning off optimization to bypass the problem.

| Why do I get compilation error when compiling Xerces-C++ on FreeBSD with native transcoder? |

| Please make sure you configure with "-t IconvFBSD" to use FreeBSD specific native transcoder. Or you can use ICU transcoder (configure with -t icu) instead of the native transcoder.

| Building Xerces-C++ with compiler GCC 2.7.x or 2.8.x gives problem, what's wrong? |

| Users using GCC 2.7.x or 2.8.x may have unsuccessful compile/link/run experience with Xerces-C++. There were issues related to templates and multi threaded exception handling with this old version GCC compiler. Please upgrade to at least GCC 2.95.2.

| Why does my application gives unresolved linking errors on Solaris? |

On Solaris there are a few things that need to be done before you execute your application using Xerces-C++. In case you're using the binary build of Xerces-C++ make sure that the OS and compiler are the same version as the ones used to build the binary (please refer to FAQ: What platforms / compilers are being used to build the binary distribution kits?). Different OS and compiler versions might cause unresolved linking problems or compilation errors. If the versions are different, rebuild the Xerces-C++ library on your system before building your application. If you're using ICU (which is packaged with XML4C) you need to rebuild the compatible version of ICU first.

Also check that the library path is set properly and that the correct versions of `gmake` and `autoconf` are on your system.

| Why does my application gives unresolved linking errors on AIX? |

In case you're using the binary build of Xerces-C++ make sure that the OS and compiler are the same version as the ones used to build the binary (please refer to FAQ: What platforms / compilers are being used to build the binary distribution kits?). Different OS and compiler versions might cause unresolved linking problems or compilation errors. If the versions are different, rebuild the Xerces-C++ library on your system before building your application. If you're using ICU (which is packaged with XML4C) you need to rebuild the compatible version of ICU first.

Also check that the library path is set properly and that the correct versions of `gmake` and `autoconf` are on your system.

| Why do I get link error saying icudata library not found when building with ICU? |

| There is a bug in the Makefile of ICU 1.7, 1.8 and 1.8.1. The link created during ICU installation in $ICUROOT is, for example, icudata.so@ -> icudt17l.so instead of libicudata.so@ -> libicudt17l.so Therefore the -licudata doesn't work. To bypass the problem, please manually create the following link: libicudata.so@ -> libicudt17l.so This problem has been fixed in ICU 2.0.

| I cannot run the sample applications. What is wrong? |

In order to run an application built using Xerces you must set up your path and library search path properly. In the stand-alone version from Apache, you must have the Xerces-C++ runtime library available from your path settings.

On Windows this library is called `xerces-c_2_1_0.dll` which must be available from your `PATH` settings. (Note that there are separate debug and release dlls for Windows. The release dll is named `xerces-c_2_1_0.dll`, and the debug dll is named `xerces-c_2_1_0d.dll)`.

On UNIX platforms the library is called libxerces-c.so.21.0 (or libxerces-c21.0.so or libxerces-c.sl.21.0) which must be available from your `LD_LIBRARY_PATH` (or `LIBPATH` or `SHLIB_PATH`) environment variable.

Thus, if you installed your binaries under `$HOME/fastxmlparser`, you need to point your library path to that directory.

    export LIBPATH=$LIBPATH:$HOME/fastxmlparser/lib # (AIX)
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/fastxmlparser/lib # (Solaris, Linux)
    export SHLIB_PATH=$SHLIB_PATH:$HOME/fastxmlparser/lib # (HP-UX)

If you are using the enhanced version of this parser from IBM, you will need to put in two additional DLLs. In the Windows build these are `icuuc.dll` and `icudata.dll` which must be available from your PATH settings. On UNIX, these libraries are called `libicuuc.so` and `libicudata.so` (or `.sl` for HP-UX or `.a` for AIX) which must be available from your library search path.

| Why does my application crash on AIX when I run it under a multi-threaded environment? |

AIX maintains two kinds of libraries on the system, thread-safe and non-thread safe. Multi-threaded libraries on AIX follow a different naming convention, Usually the multi-threaded library names are followed with "_r". For example, libc.a is single threaded whereas libc_r.a is multi-threaded.

To make your multi-threaded application run on AIX, you must ensure that you do not have a "system library path" in your `LIBPATH` environment variable when you run the application. The appropriate libraries (threaded or non-threaded) are automatically picked up at runtime. An application usually crashes when you build your application for multi-threaded operation but don't point to the thread-safe version of the system libraries. For example, LIBPATH can be simply set as:

    LIBPATH=$HOME/<Xerces>/lib

Where <Xerces> points to the directory where the Xerces application resides.

If, for any reason unrelated to Xerces, you need to keep a "system library path" in your LIBPATH environment variable, you must make sure that you have placed the thread-safe path before you specify the normal system path. For example, you must place /lib/threads before /lib in your LIBPATH variable. That is to say your LIBPATH may look like this:

    export LIBPATH=$HOME/<Xerces>/lib:/usr/lib/threads:/usr/lib

Where /usr/lib is where your system libraries are.

| Why does my multi-threaded application crash on Solaris 2.6? |

| The problem appears because the throw call on Solaris 2.6 is not multi-thread safe. Sun Microsystems provides a patch to solve this problem. To get the latest patch for solving this problem, go to SunSolve.sun.com and get the appropriate patch for your operating system. For Intel machines running Solaris, you need to get Patch ID 104678. For SPARC machines you need to get Patch ID #105591.

| I just built my own application using the Xerces-C++ parser. Why does it crash? |

In order to work with the Xerces-C++ parser, you have to first initialize the XML subsystem. The most common mistake is to forget this initialization. Before you make any calls to Xerces-C++ APIs, you must call XMLPlatformUtils::Initialize():

    try {
       XMLPlatformUtils::Initialize();
    }
    catch (const XMLException& toCatch) {
       // Do your failure processing here
    }

This initializes the Xerces system and sets its internal variables. Note that you must the include `xercesc/util/PlatformUtils.hpp` file for this to work.

| Why does deleting a transcoded string result in assertion on windows? |

| Both your application program and the Xerces DLL must use the same *DLL* version of the runtime library. If either statically links to the runtime library, the problem will still occur. For example, for a Win32/VC6 build, the runtime library build setting MUST be "Multithreaded DLL" for release builds and "Debug Multithreaded DLL" for debug builds.

| The libs/dll's I downloaded keep me from using the debugger in VC6.0. I am using the 'D', debug versions of them. "no symbolic information found" is what it says. Do I have to compile everything from source to make it work? |

| Unless you have the .pdb files, all you are getting with the debug library is that it uses the debug heap manager, so that you can compile your stuff in debug mode and not be dangerous. If you want full symbolic info for the Xerces-C++ library, you'll need the .pdb files, and to get those, you'll need to rebuild the Xerces-C++ library.

| "First-chance exception in DOMPrint.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception." I am always getting this message when I am using the parser. My programs are terminating abnormally. Even the samples are giving this exception. I am using Visual C++ 6.0 with latest service pack installed. |

Xerces-C++ uses C++ exceptions internally, as part of its normal operation. By default, the MSVC debugger will stop on each of these with the "First-chance exception ..." message.

To stop this from happening do this:

- start debugging (so the debug menu appears)
- from the debug menu select "Exceptions"
- from the box that opens select "Microsoft C++ Exception" and set it to "Stop if not handled" instead of "stop always".

You'll still land in the debugger if your program is terminating abnormally, but it will be at your problem, not from the internal Xerces-C++ exceptions.

| "Fatal Error: Cannot open include file: XXX: No such file or directory"? |

| Due to the recent directory change, you may need to either update your project file, makefile, or your source/header file, for details, please refer to Directory Change.

Copyright © 2001 The Apache Software Foundation. All Rights Reserved.