Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 110DCF5C0 for ; Sun, 31 Mar 2013 09:06:52 +0000 (UTC) Received: (qmail 60769 invoked by uid 500); 31 Mar 2013 09:06:51 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 60504 invoked by uid 500); 31 Mar 2013 09:06:46 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 60461 invoked by uid 99); 31 Mar 2013 09:06:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Mar 2013 09:06:45 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sindhi.for@gmail.com designates 209.85.219.68 as permitted sender) Received: from [209.85.219.68] (HELO mail-oa0-f68.google.com) (209.85.219.68) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Mar 2013 09:06:38 +0000 Received: by mail-oa0-f68.google.com with SMTP id j6so364811oag.3 for ; Sun, 31 Mar 2013 02:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=0uEGsYho6vL+3sklfVgkaa7qZ2jMfTFwWA82dQk58H0=; b=Fadh5TEZXcJwoQsvm9eijVxRGaNwozzGg90XpYfsFiqK3PXIBbzYrTr+7tVdt3P0cA IunSuhkzTCFWWf3yVCIN1TawrQmzjgmIP5S43dAVpY9S23JJ7IeEpBpfUPxpZxZJCJdp GPSnucY3vRA+UD2p1qmTgT4GAp6MsuKv0Xy3rHfF4Ll7uTMV3JE/D+D3xipKS/vPToHk 6hmboMvc8858vo7EHepVMjpV5eWYKnI7Jlvk6yZi+fIWJ2DoH59HEMMuXJqdcjp12W+g VvzEqg752mrtYV1gox8DAI8c3ZQIdGpPnATe7uAUws6bx5+qxE/jsgub5kHKeDFRHVxO PFwA== MIME-Version: 1.0 X-Received: by 10.182.156.103 with SMTP id wd7mr2716438obb.33.1364720777546; Sun, 31 Mar 2013 02:06:17 -0700 (PDT) Received: by 10.76.109.108 with HTTP; Sun, 31 Mar 2013 02:06:17 -0700 (PDT) Date: Sun, 31 Mar 2013 14:36:17 +0530 Message-ID: Subject: Apache fails to start when Xerces library is used in a C++ module From: Sindhi Sindhi To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=f46d0444e83529d1bc04d934d1d5 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0444e83529d1bc04d934d1d5 Content-Type: text/plain; charset=ISO-8859-1 Hello, 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 - 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 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 2. Additional Dependencies = xerces-c_3.lib and xerces-c_static_3.lib 3. 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 4. 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 5. 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 6. The code in my C++ module to invoke the Xerces library routine goes like this - try { XMLPlatformUtils::Initialize(); // Initialize Xerces infrastructure } catch( XMLException& e ) { char* message = XMLString::transcode( e.getMessage() ); XMLString::release( &message ); } XMLPlatformUtils::Terminate(); 7. Added the below in httpd.conf file - LoadModule filter_module modules/XercesDLL.dll AddOutputFilterByType TagFilter text/html text/plain text/css 8. If i try to launch httpd.exe from command prompt, I see the below error - >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: The specified module could not be found. 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. 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. I think its got something to do with the C to C++ linkage, not sure tho. Any help is highly appreciated. Thanks. --f46d0444e83529d1bc04d934d1d5--