[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-internals
Subject:    Re: How to use template class List?
From:       Sergei Golubchik <serg () mysql ! com>
Date:       2008-07-23 13:52:25
Message-ID: 20080723135225.GB17415 () janus ! mylan
[Download RAW message or body]

Hi!

On Jul 23, Nihal Dindar wrote:
> Hello,
>
> I am trying to use template class /List/ defined in "sql/sql_list.h". My 
> code as follows:
>
> ------------------------ state.h--------------------------------
>
> #ifndef STATE_H_
> #define STATE_H_
>
> #include "sql_list.h"
> #include "match_tuple.h"
>
> class State{
> ...
> char *name;
> List<Match_tuple> *matches;
> ...
> };
> #endif
> ------------------------ state.h--------------------------------
>
> It gives the following error:
>
> In file included from state.h:5,
> from fsm.h:4,
> from mysql_priv.h:43,
> from ha_ndbcluster.cc:26:
>
> sql_list.h: In static member function ?static void* Sql_alloc::operator 
> new(size_t)?:
> sql_list.h:30: error: ?sql_alloc? was not declared in this scope
> sql_list.h: In static member function ?static void* Sql_alloc::operator new 
> [](size_t)?:
> sql_list.h:34: error: ?sql_alloc? was not declared in this scope
> make[2]: *** [libndb_la-ha_ndbcluster.lo] Error 1

I don't know exactly what you have done to the sources, but
 * the error is about _sql_alloc_ being _not declared_
 * sql_alloc is declared in mysql_priv.h:94
 * you include your file in mysql_priv.h:43
 => no wonder you get an error

Regards / Mit vielen Grüssen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Engineer/Server Architect
/_/  /_/\_, /___/\___\_\___/  Sun Microsystems GmbH, HRB München 161028
       <___/                  Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals?unsub=mysql-internals@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic