httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Bor <frederic....@wanadoo.fr>
Subject RE: using apxs
Date Fri, 25 Feb 2005 09:24:35 GMT
Hi,

You're using C++ classes in C code. That's not possible and you can fix this
either by rewriting your C++ code in C, or either by doing C wrappers (look
for usage of extern "C").

Good luck.


-----Message d'origine-----
De : news [mailto:news@sea.gmane.org] De la part de Laszlo
Envoyé : vendredi 25 février 2005 10:15
À : dev@httpd.apache.org
Objet : using apxs

Hi all,

I created a C1.hpp and C1.cpp, compiled and linked into a C1.a
file. I did copy the C1.a file into /usr/local/apache2/lib and
C1.hpp into /usr/local/apache2/include. This class provides
some usefull methods to process a request.

OK. Now I would like to use it in my module mod_xyz.
Entering the command

	/usr/local/apache2/bin/apxs -c -i -a mod_xyz.c

returns these lines:

/usr/local/apache2/build/libtool --silent --mode=compile gcc3 -prefer-pic
-DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500
-D_BSD_SOURCE
-D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache2/include
-I/usr/local/apache2/include   -I/usr/local/apache2/include   -c -o
mod_xyz.lo mod_xyz.c && touch
mod_xyz.slo
In file included from mod_xyz.c:4:
/usr/local/apache2/include/C1.hpp:6: parse error before "C1"
/usr/local/apache2/include/C1.hpp:7: syntax error before '{' token
/usr/local/apache2/include/C1.hpp:20: syntax error before "int"
/usr/local/apache2/include/C1.hpp:27: syntax error before "int"
/usr/local/apache2/include/C1.hpp:33: syntax error before "int"
/usr/local/apache2/include/C1.hpp:39: syntax error before "void"
/usr/local/apache2/include/C1.hpp:46: syntax error before "int"
/usr/local/apache2/include/C1.hpp:53: syntax error before "char"
/usr/local/apache2/include/C1.hpp:55: parse error before ':' token
apxs:Error: Command failed with rc=65536
.

How can I fix it?
-----------------

László Graf




Mime
View raw message