[Insight-users] Windows -> Linux : Expected ; before

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Nov 30 09:51:23 EST 2005


On Wed, 30 Nov 2005 15:34:37 +0100, Vincent Daanen  
<vincent.daanen at imag.fr> wrote:

> ok, it compiles ok now !
>

great :-)

> Thanks Gaetan
>
> Could you please explain me why adding the typename keyword before the  
> type is required ?

I just know that in template class, nested types must be preceded by the  
typename keyword.

And gcc 3.4 and more give a very poor error message; the gcc 3.3 one was  
far much clearer

>
>  Vince
>
> Gaetan Lehmann a écrit :
>
>>
>> Hi,
>>
>> You should try to add the typename keyword before the type:
>>
>>   typename ImportFilterType::Pointer importFilter =   
>> ImportFilterType::New();
>>
>> Gaetan
>>
>> On Wed, 30 Nov 2005 11:38:49 +0100, Vincent Daanen   
>> <vincent.daanen at imag.fr> wrote:
>>
>>> Hi itk users,
>>>
>>> I want to run a itk-pipeline initially written and tested on Win32   
>>> platform on a Linux platform.
>>>
>>> The following code (really standard itk code) compiles ok on win32  
>>> (msv  c++ 6) but fails on linux platform (g++ 3.4.1).
>>>
>>>     typedef itk::ImportImageFilter< PixelType,   
>>> itkUsage_InternalDimension > ImportFilterType;
>>>     ImportFilterType::Pointer importFilter = ImportFilterType::New();
>>>
>>> g++ says : "expected ;before importFilter" !!!
>>>
>>> this code is part of a static method which convert a buffer  
>>> (PixelType  *, int *volumeSize, double *voxelSize) in a  
>>> itkImage<float,3>
>>> The only reason to fail on linux I see is that this code "uses" a   
>>> feature of msvc compiler but  I don't know which one !!
>>>
>>> Can anybody helps me ??
>>>
>>>  Vince
>>>
>>
>>
>>
>
>



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-users mailing list