httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rscheckelhoff" <rscheckelh...@yahoo.com>
Subject Re: C++ module compile with apxs
Date Sun, 11 Sep 2005 13:58:16 GMT

Hi:

I have been having some of the same problems with the apxs script.  I 
think that because apache 1.3 is built with c (not c++), apxs is 
defaulting to the standard c lib for the build.  Additionally, I think 
that it just ignores your apxs switch to use the stdc++ library.  I 
guess we could rewrite the perl script!

But anyway, I have been using a work-around.  I just create two 
projects, (a "skinny" one for a standard c-apxs build mother-module, and 
a "fat" C++ library project for my back-end code).  I use apxs to 
compile the skinny module, and build the C++ separately as a shared 
library. Then I just call the C++ library "wrapper" routines from within 
the apxs code using dlopen/dlfunc/dlsym/etc.  (Since my "back-end" 
library only returns an answer or html page, etc., the wrapper code is 
not much of a nuisance.)

I wonder if Apache 2.0 apxs script better accomodates C++ ?

 -rleesBSD


--- In new-httpd@yahoogroups.com, Farheen Jafri <jafrif@y...> wrote:
> Hello,
> 
> I create C++ module because i ve to use STL in it.
> When i compile it with apxs, 
> 
> apxs -L /usr/include/c++/ -L
> /usr/include/c++/3.2/i386-redhat-linux/ -I/usr/lib/ -i
> -c mod_replace.cpp
> 
> 
> it create .so but not complete because restarting
> apache gives "undefined sysmbol: replace_module"
> error.
> 
> #httpd.conf 
> 
> LoadModule replace_module modules/mod_replace.so
> 
> where replace_module is the name of module defined in
> mod_replace.cpp
> 
> plz tell me any method to compile cpp module which
> uses STL by apxs. Any help will be appreciated!
> 
> Regards,
> Farheen
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com



Mime
View raw message