[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    RE: [apache-modules] Compiling a cpp module
From:       "Shay Cohen" <shay () erocki ! com>
Date:       2006-03-02 10:14:19
Message-ID: FBA5128ADF53834291C7A4AE896CB02B045BA1 () erockiserver ! eserver ! erocki ! com
[Download RAW message or body]

Thanks, that works!

-----Original Message-----
From: Nick Kew [mailto:nick@webthing.com] 
Sent: Wednesday, March 01, 2006 10:30 PM
To: apache-modules@covalent.net
Subject: Re: [apache-modules] Compiling a cpp module

On Wednesday 01 March 2006 19:16, Shay Cohen wrote:
> Hello,
>
> I am trying to compile an apache module that uses C++ code.
> When I use apxs, I do not get the module structure exported (although
I
> do use extern "C" - it is not exported at all - not even with name
> mangling).
>
> I thought it would be better to compile the module from scratch
without
> using apxs. What should I pay attention to while doing that? I tried
> compiling it the same way I did with apache 1.3, but I get

c++ -O2 -Wall -fPIC -shared -c -I/usr/local/apache/include mod_foo.cpp
g++ -Wall -shared -o mod_foo.so mod_foo.o

Your module symbol will need to be extern "C".
Use LoadFile to resolve any dependencies.

-- 
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net
For additional commands, e-mail: apache-modules-help@covalent.net



---------------------------------------------------------------------
To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net
For additional commands, e-mail: apache-modules-help@covalent.net


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic