[Insight-users] Finally built ITK

Mdl mdl78@libero.it
Thu, 14 Nov 2002 01:20:18 +0100


Hi ITK-ers,

I finally did it and got ITK built properly. I want to tell you how I did,
just in case anyone may have the same problem or this can be helpful for
someone.

I had to change itk_alloc.h code, exactly these lines:

static value_type *allocate(size_t n)
{ return 0 == n? 0 : (value_type*) alloc_type().allocate(n * chunk, 0); }

static value_type *allocate(void)

{ return (value_type*) alloc_type().allocate(chunk, 0); }



...became:



static value_type *allocate(size_t n)

{ return 0 == n? 0 : (value_type*) alloc_type().allocate(n * chunk); }

static value_type *allocate(void)

{ return (value_type*) alloc_type().allocate(chunk); }



I had to do this because the compiler went on saying that the method didn't
take two parameters. I did it without worry because the second parameter is
absolutely useless when it is 0 (see std help for the reason).



Bye,

Marco