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 08548107A4 for ; Thu, 2 May 2013 09:17:07 +0000 (UTC) Received: (qmail 73006 invoked by uid 500); 2 May 2013 09:17:06 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 72802 invoked by uid 500); 2 May 2013 09:17:05 -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 Delivered-To: moderator for modules-dev@httpd.apache.org Received: (qmail 71154 invoked by uid 99); 2 May 2013 09:16:11 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Date: Thu, 2 May 2013 11:11:08 +0200 From: Ralf Mattes To: modules-dev@httpd.apache.org Subject: Re: Using APR based C++ classes in Apache2 module Message-ID: <20130502091108.GA28849@seid-online.de> References: <51811D28.5030208@joe-lewis.com> <51821ECB.3000005@datatrans.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51821ECB.3000005@datatrans.hu> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: "Ralf Mattes,,," X-Virus-Checked: Checked by ClamAV on apache.org On Thu, May 02, 2013 at 10:07:39AM +0200, Graf L?szl? wrote: > > Hi Joe, > > I appreciate your response. I did a search on the net and I found > this, two parts, How-To: > > http://www.codeproject.com/Articles/491909/Apache-2-x-Modules-In-Cplusplus-Part-1 > > http://www.codeproject.com/Articles/492398/Apache-2-x-Modules-In-Cplusplus-Part-2 > > I followed all the steps but at the end, when I restarted the Apache > server, I got this error: > > httpd: Syntax error on line 521 of /home/sk/apache2/conf/httpd.conf: > Cannot load modules/mod_foo.so into server: > /home/sk/indian/modules/mod_foo.so: undefined symbol: > foo_register_config_ptr > > I links to the header files into the Apache2's include folder and a No need to link the header files - what for? > link to the SO into the Apache2's modules folder. Yes, and obviously it's found by the server (otherwise it wouldn't complain about it, would it? :-) > > Am I missing something here? No you, but your linker. Where is 'foo_register_config_ptr' defined? And before any further investigation: you don't by chance try to compile with a C++ compiler? If so, You know about name mangling? If not, it's time for some C vs. C++ readup .... HTH Ralf Mattes > Best regards, > SK