Compile Error

From: WA Support <>
Date: Fri, 26 Sep 2003 14:10:22 -0700


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

I am trying to add MySQL (mysql-4.0.15) query capability in the 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

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

-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 '' || echo './'`; \
then mv -f ".deps/redirect.Tpo" ".deps/redirect.Po"; \
else rm -f ".deps/redirect.Tpo"; exit 1; \
In file included from mysql.h:107,
../include/my_alloc.h:37: syntax error before `+' token
cc1plus: warnings being treated as errors

<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 */

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 to compile. Any help on this one would also be appreciated.

Any help with this would be greatly appreciated.


Murrah Boswell
Systems Administrator
Wild Apache Internet Services
Received on Fri Sep 26 2003 - 15:08:04 MDT

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