Can not include my code into squid

From: Arthur Tumanyan <arthurtumanyan_at_yahoo.com>
Date: Tue, 4 Oct 2011 08:21:47 -0700 (PDT)

Hi,all. I have some troubles.When I trying make squid with my sources
(SquidShell.cc,SquidShell.h),I got
error:
/root_at_dreambox:/home/arthur/workspace/squid# make
Making all in compat
make[1]: Entering directory `/home/arthur/workspace/squid/compat'
g++ -DHAVE_CONFIG_H -I.. -I../include -I../lib -I../src -I../include
-Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT
-g -O2 -MT assert.o -MD -MP -MF .deps/assert.Tpo -c -o assert.o assert.cc
In file included from ../include/config.h:68:0,
                 from assert.cc:34:
../src/shell/SquidShell.h:9:18: error: ‘StoreEntry’ has not been declared
make[1]: *** [assert.o] Error 1
make[1]: Leaving directory `/home/arthur/workspace/squid/compat'
make: *** [all-recursive] Error 1
root_at_dreambox:/home/arthur/workspace/squid#
/
then I add #include "Store.h" to SquidShell.h
and getting this:
/Making all in compat
make[1]: Entering directory `/home/arthur/workspace/squid/compat'
g++ -DHAVE_CONFIG_H -I.. -I../include -I../lib -I../src -I../include
-Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -pipe -D_REENTRANT
-g -O2 -MT assert.o -MD -MP -MF .deps/assert.Tpo -c -o assert.o assert.cc
In file included from ../include/snmp.h:74:0,
                 from ../include/cache_snmp.h:19,
                 from ../src/squid.h:158,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../include/snmp_debug.h:7:56: error: expected initializer before
‘PRINTF_FORMAT_ARG2’
In file included from ../include/util.h:66:0,
                 from ../src/squid.h:165,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../include/SquidNew.h: In function ‘void* operator new(size_t)’:
../include/SquidNew.h:47:24: error: ‘xmalloc’ was not declared in this scope
../include/SquidNew.h: In function ‘void operator delete(void*)’:
../include/SquidNew.h:51:18: error: ‘xfree’ was not declared in this scope
../include/SquidNew.h: In function ‘void* operator new [](size_t)’:
../include/SquidNew.h:55:24: error: ‘xmalloc’ was not declared in this scope
../include/SquidNew.h: In function ‘void operator delete [](void*)’:
../include/SquidNew.h:59:18: error: ‘xfree’ was not declared in this scope
In file included from ../include/Array.h:40:0,
                 from ../include/Stack.h:37,
                 from ../include/splay.h:11,
                 from ../include/MemPool.h:26,
                 from ../src/squid.h:167,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../include/fatal.h: At global scope:
../include/fatal.h:5:47: error: expected initializer before
‘PRINTF_FORMAT_ARG1’
In file included from ../include/Stack.h:37:0,
                 from ../include/splay.h:11,
                 from ../include/MemPool.h:26,
                 from ../src/squid.h:167,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../include/Array.h: In static member function ‘static void*
Vector<E>::operator new(size_t)’:
../include/Array.h:124:24: error: there are no arguments to ‘xmalloc’ that
depend on a template parameter, so a declaration of ‘xmalloc’ must be
available
../include/Array.h:124:24: note: (if you use ‘-fpermissive’, G++ will accept
your code, but allowing the use of an undeclared name is deprecated)
../include/Array.h: In static member function ‘static void
Vector<E>::operator delete(void*)’:
../include/Array.h:131:19: error: there are no arguments to ‘xfree’ that
depend on a template parameter, so a declaration of ‘xfree’ must be
available
In file included from ../src/HttpHeaderRange.h:40:0,
                 from ../src/HttpHeader.h:37,
                 from ../src/structs.h:38,
                 from ../src/squid.h:169,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../src/Packer.h: At global scope:
../src/Packer.h:62:47: error: expected initializer before
‘PRINTF_FORMAT_ARG2’
In file included from ../src/squid.h:169:0,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../src/structs.h:127:5: error: ‘regex_t’ does not name a type
In file included from ../src/squid.h:169:0,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../src/structs.h:1067:5: error: ‘regex_t’ does not name a type
In file included from ../src/protos.h:105:0,
                 from ../src/squid.h:170,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../src/Debug.h:145:41: error: expected initializer before
‘PRINTF_FORMAT_ARG1’
In file included from ../src/squid.h:170:0,
                 from ../src/Store.h:40,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../src/protos.h:266:76: error: expected initializer before
‘PRINTF_FORMAT_ARG3’
In file included from ../src/StoreIOBuffer.h:40:0,
                 from ../src/Store.h:41,
                 from ../src/shell/SquidShell.h:4,
                 from ../include/config.h:68,
                 from assert.cc:34:
../src/MemBuf.h:114:38: error: expected ‘;’ before ‘PRINTF_FORMAT_ARG2’
In file included from ../src/shell/SquidShell.h:4:0,
                 from ../include/config.h:68,
                 from assert.cc:34:
../src/Store.h:365:69: error: expected initializer before
‘PRINTF_FORMAT_ARG2’
make[1]: *** [assert.o] Error 1
make[1]: Leaving directory `/home/arthur/workspace/squid/compat'
make: *** [all-recursive] Error 1
root_at_dreambox:/home/arthur/workspace/squid#
/
Can't get rid of this trouble.Can someone point me,what I'm doing wrong?
Thanx.

My source files already included in Makefile,and configure.in. I have no
problem with that.I could even make a squid example with empty SquidShell.cc
and SquidShell.h files

-----
I SEE YOU

--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Can-not-include-my-code-into-squid-tp3871362p3871362.html
Sent from the Squid - Development mailing list archive at Nabble.com.
Received on Tue Oct 04 2011 - 15:21:49 MDT

This archive was generated by hypermail 2.2.0 : Tue Oct 04 2011 - 12:00:05 MDT