Trying to Add MySQL support problem

From: WA Support <support@dont-contact.us>
Date: Fri, 26 Sep 2003 15:44:29 -0700

Sorry that this is a repost of a message that I posted earlier today
with the Subject: Compile Error, but I had another one a few days ago
with the same Subject on a different issue.

Hello,

I realize that this may be off topic a bit, but I can't figure this one
out.

I am trying to add MySQL (mysql-4.0.15) query capability in the
redirect.cc module for squid-3.0-PRE3-20030924.

I am running Redhat 7.3 with kernel 2.4.20-19.7,
glibc-2.2.5-43.i686 (from Redhat rpm), and gcc/g++ 3.2.3 from GNU
tarball.

When I include mysql.h to the redirect.cc module and try to compile
Squid, I get:

<snip>
if g++ -DHAVE_CONFIG_H
-DDEFAULT_CONFIG_FILE=\"/usr/local/squid/etc/squid.conf\" -I. -I.
-I../include -I. -I. -I../include -I../include
-I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings
-Wmissing-prototypes -Wcomments -g -O2 -MT redirect.o -MD -MP -MF
".deps/redirect.Tpo" \
  -c -o redirect.o `test -f 'redirect.cc' || echo './'`redirect.cc; \
then mv -f ".deps/redirect.Tpo" ".deps/redirect.Po"; \
else rm -f ".deps/redirect.Tpo"; exit 1; \
fi
In file included from mysql.h:107,
                 from redirect.cc:46:
../include/my_alloc.h:37: syntax error before `+' token
cc1plus: warnings being treated as errors

i.e.,
<snip from my_alloc.h>
00035 typedef struct st_mem_root
00036 {
00037 USED_MEM *free; /* blocks with free memory in
it */
00038 USED_MEM *used; /* blocks almost without free
memory */
<snip>

I don't understand what the g++ compiler is complaining about with the
syntax error before`+' token, I don't see a "+" token.

I added my_alloc.h (and other header files) from the MySQL distribution
to the Squid 'include' directory.

Also, I am not sure how to link in -lmysqlclient when I do finally get
redirect.cc to compile. Any help on this one would also be appreciated.

Any help with this would be greatly appreciated.

Thanks,

Murrah Boswell
Systems Administrator
Wild Apache Internet Services
support@wildapache.net
Received on Fri Sep 26 2003 - 16:42:10 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:42 MST