You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rscheckelhoff <rs...@yahoo.com> on 2005/09/11 15:58:16 UTC
Re: C++ module compile with apxs
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 <ja...@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