[Insight-developers] Problem using RegisterOverride under Cygwin

Bill Hoffman bill.hoffman@kitware.com
Thu, 25 Jan 2001 14:15:47 -0500


--=====================_77471027==_.ALT
Content-Type: text/plain; charset="us-ascii"

It looks like the cast up the hierarchy is broken on the smartpointer 
for gcc, but I would need to see your source code to figure that out.

Can you try this:
In itkCreateObjectFunction.h change the CreateObject to look like this:

 LightObject::Pointer CreateObject()
    {
    return T::New().GetPointer();
    }

Does that fix the problem?

-bill

At 01:59 PM 1/25/2001 -0500, Parag Chandra wrote:

>/cygdrive/d/development/Insight/Code/Common/itkCreateObjectFunction.h:76: conver
>sion from `itk::SmartPointer<itk::FileIOMetaImage>' to non-scalar type `itk::Sma
>rtPointer<itk::LightObject>' requested
> 
>Does anyone know why only Cygwin (and possibly all g++ compilers) complains while VC++ does not?
> 
>Thanks,
>-Parag Chandra

--=====================_77471027==_.ALT
Content-Type: text/html; charset="us-ascii"

It looks like the cast up the hierarchy is broken on the smartpointer

for gcc, but I would need to see your source code to figure that out.

Can you try this:
In itkCreateObjectFunction.h change the CreateObject to look like this:

 LightObject::Pointer CreateObject()
    {
    return T::New().GetPointer();
    }

Does that fix the problem?

-bill

At 01:59 PM 1/25/2001 -0500, Parag Chandra wrote:

/cygdrive/d/development/Insight/Code/Common/itkCreateObjectFunction.h:76: conver
sion from `itk::SmartPointer<itk::FileIOMetaImage>' to non-scalar type `itk::Sma
rtPointer<itk::LightObject>' requested

 
Does anyone know why only Cygwin (and possibly all g++ compilers) complains while VC++ does not?
 
Thanks,
-Parag Chandra
--=====================_77471027==_.ALT--