title: Apache fails to start when Xerces library is used in a C++ module
body: <p>I have written a C++ module to invoke the Xerces C++ XML library to parse a XML file. I'm unable to start httpd.exe with these changes. Here are the details -</p>
  
  <p>a) Apache server version: httpd-2.4.4-win64
  b) Xerces version: xerces-c-3.1.1-x86_64-windows-vc-10.0
  c) Development envt: Visual Studio 2010 with SP1</p>
  
  <p>Following are the settings I have made in Visual Studio so that the C++ module refers to the Xerces library:
  1. Additional Include Directories = E:\xerces-c-3.1.1-x86_64-windows-vc-10.0\xerces-c-3.1.1-x86_64-windows-vc-10.0\include</p>
  
  <ol>
  <li><p>Additional Dependencies = xerces-c_3.lib and xerces-c_static_3.lib</p></li>
  <li><p>Additional library directories = E:\xerces-c-3.1.1-x86_64-windows-vc-10.0\xerces-c-3.1.1-x86_64-windows-vc-10.0\lib</p></li>
  <li><p>Debugging -> Environment: PATH=E:\xerces-c-3.1.1-x86_64-windows-vc-10.0\xerces-c-3.1.1-x86_64-windows-vc-10.0\bin</p></li>
  <li><p>In the Operating System environment variables, added the path E:\xerces-c-3.1.1-x86_64-windows-vc-10.0\xerces-c-3.1.1-x86_64-windows-vc-10.0\bin to the environment variable PATH</p></li>
  <li><p>The code in my C++ module to invoke the Xerces library routine goes like this -</p>
  
  <p>try { 
      XMLPlatformUtils::Initialize();  // Initialize Xerces infrastructure
  }
  catch( XMLException&amp; e ) {
      char* message = XMLString::transcode( e.getMessage() );
      XMLString::release( &amp;message );
  }
  XMLPlatformUtils::Terminate();  </p></li>
  <li><p>Added the below in httpd.conf file -
  LoadModule filter_module modules/XercesDLL.dll
  AddOutputFilterByType TagFilter text/html text/plain text/css</p></li>
  <li><p>If i try to launch httpd.exe from command prompt, I see the below error -</p>
  
  <blockquote>
    <p>httpd.exe
    httpd.exe: Syntax error on line 172 of E:/httpd-2.4.4-win64/Apache24/conf/httpd.conf: Cannot load modules/XercesDLL.dll into server: T
    he specified module could not be found.</p>
  </blockquote></li>
  </ol>
  
  <p>Even if I comment out the above C++ code in step 6, Apache still fails to start. That means Apache is failing to load the Xerces library version I'm using, irrespective of the way I'm invoking the library.</p>
  
  <p>However, If I write a standalone DLL that invokes the above Xerces library version, and invoke this DLL from an EXE then I'm successfully able to parse the XML. This means, the Xerces library fails to get loaded only by the Apache server for some reason.</p>
  
  <p>I think its got something to do with the C to C++ linkage, not sure tho.</p>
  
  <p>Any help is highly appreciated.</p>
  
  <p>Thanks.</p>