httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Leon <Marcus.L...@baltimore.com>
Subject Re: Problems building C++ modules for Apache 2.0
Date Wed, 31 Jul 2002 16:18:00 GMT
I tried using extern "C" statements with no luck.  I included the module
code below.  You'll notice this is a bare bones module that I stripped down
for testing purposes.  Our config is Apache 2.0.39, Red Hat Linux 7.?, gcc.

Thanks for your reply, Andy.

>>>>

#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#include "http_log.h"
#include "http_protocol.h"
#include "http_request.h"
#include "http_main.h"
#include "util_script.h"

extern "C" module AP_MODULE_DECLARE_DATA enforcer_module;

extern "C" {
module AP_MODULE_DECLARE_DATA enforcer_module =
{
    STANDARD20_MODULE_STUFF,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL 
 };
}

> To: users@httpd.apache.org
> From: Andy Cutright <acutright@borland.com>
> Subject: Re: Problems building C++ modules for Apache 2.0
> 
> my first thought is that by changing the extension, you 
> affect how the 
> compiler treats the file. the file is either a C module or a 
> C++ module 
> depending on its extension. if this is the case (it may or 
> may not be, 
> depending on your compiler), you've probably affected the 
> linkage, and 
> this symbol isn't linked properly. is this symbol surrounded 
> by #ifdef 
> _CPP or 'extern' linkage specificiers?
> 
> what platform/ compiler/ etc..
> 
> cheers,
> andy
> > 
> > Hello, we modified our apxs to build C++ modules but we get 
> > an error when we
> > start Apache.  The peculiar thing is that this file builds 
> > and runs fine
> > when you give it a .c extension.  It's only the c++ file that causes
> > troubles.  Does anyone have any suggestions?
> > 
> > The error is:
> > Syntax error on line 232 of /home/mleon/apache2/conf/httpd.conf:
> > Can't locate API module structure `enforcer_module' in file
> > /home/mleon/apache2/modules/mod_enforcer.so:
> > /home/mleon/apache2/lib/libapr.so.0: undefined symbol: enforcer_module




-----------------------------------------------------------------------------------------------------------------
The information contained in this message is confidential and is intended
for the addressee(s) only.  If you have received this message in error or
there are any problems please notify the originator immediately.  The 
unauthorised use, disclosure, copying or alteration of this message is 
strictly forbidden. Baltimore Technologies plc will not be liable for
direct, special, indirect or consequential damages arising from alteration of the
contents of this message by a third party or as a result of any virus being 
passed on.
 
This footnote confirms that this email message has been swept for Content Security threats,
including
computer viruses.

http://www.baltimore.com

 
This footnote confirms that this email message has been swept by 
Baltimore MIMEsweeper for Content Security threats, including
computer viruses.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message