I've never done Apache module stuff in C++ (C only) but I'd guess thats a good place to look first. I believe there are a few libraries out there that take some of the pain out of doing Apache modules in C++, so you might google around for those.
Josh On Wed, Nov 18, 2009 at 7:56 AM, Mauro <mau...@gmail.com> wrote: > Hi, > > I'm running Mac OS Tiger (powerpc-apple-darwin8-gcc-4.0.0) and new to C > ++ and PB. > > I'm developing an Apache module that should generate a response for a > given request, both encoded with Protocol Buffers. > > I wrote an example.proto and compiled it into example.pb.h using > protoc. Then I included this example.pb.h in my mod_example.c file. > > The matter comes when attemping to make: > > make check > source='mod_example.c' object='mod_example.lo' libtool=yes \ > depfile='.deps/mod_example.Plo' tmpdepfile='.deps/mod_example.TPlo' \ > depmode=gcc3 /bin/sh ./depcomp \ > /bin/sh ./libtool --mode=compile gcc -DPACKAGE_NAME=\"\" - > DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" - > DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"mod_example\" -DVERSION=\"1.0\" - > DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 - > DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 - > DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 - > DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -I/usr/local/apache2/ > include -I/usr/include -I/usr/local/include -I/usr/include/gcc/darwin/ > 4.0/c++ -I/usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8 -g - > O2 -c -o mod_example.lo `test -f 'mod_example.c' || echo > './'`mod_example.c > gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"mod_example > \" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 - > DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 - > DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 - > DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -I/usr/ > local/apache2/include -I/usr/include -I/usr/local/include -I/usr/ > include/gcc/darwin/4.0/c++ -I/usr/include/gcc/darwin/4.0/c++/powerpc- > apple-darwin8 -g -O2 -c mod_example.c -MT mod_example.lo -MD -MP - > MF .deps/mod_example.TPlo -fno-common -DPIC -o .libs/mod_example.o > In file included from /usr/include/gcc/darwin/4.0/c++/string:44, > from protocols/realtime-bidding.pb.h:6, > from mod_example.c:5: > /usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/c++config.h: > 64: error: parse error before '__gnu_debug_def' > /usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/c++config.h: > 64: error: syntax error before '{' token > /usr/include/gcc/darwin/4.0/c++/powerpc-apple-darwin8/bits/c++config.h: > 67: error: syntax error before '{' token > > ( ... a lot of similar errors in many files ... ) > > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:499: error: > syntax error before ':' token > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:500: error: > syntax error before ':' token > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:501: error: > syntax error before ':' token > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:502: error: > syntax error before ':' token > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:503: error: > syntax error before ':' token > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:504: error: > syntax error before ':' token > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h: In function > '_M_add_reference': > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:507: error: > parse error before 'throw' > /usr/include/gcc/darwin/4.0/c++/bits/locale_classes.h:516: confused by > earlier errors, bailing out > make: *** [mod_example.lo] Error 1 > > > > I tried to change the include paths from /usr/include/gcc/darwin/4.0 > to /usr/include/gcc/darwin/3.1 and some other versions available in my > system with same result. > > I would really appreciate your help. > > Cheers, > > Mauro. > > -- > > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.