[Insight-users] Compiling ITK 2.0 - a few errors I never got before : txx incorectly marked as compilable.

Luis Ibanez luis.ibanez at kitware.com
Thu Feb 10 18:44:44 EST 2005


Hi Mark


If you use GVIM as editor you would not have those problems   :-)

                     http://www.vim.org


There is a way of indicating to Visual Studio that you want to use
GVIM (or any other editor) as your default editor.   E.g. Emacs.


ITK style files for VIM and EMACS are available in the Wiki pages.



    Regards,


       Luis



-------------------------
Mark Wyszomierski wrote:

> Ah that was just it Luis. I had included .txx for syntax highlighting
> when looking at the 1.8.x source. Thanks so much, it compiles just
> fine now,
> 
> Mark
> 
> 
> On Thu, 10 Feb 2005 17:05:32 -0500, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> 
>>Hi Mark,
>>
>>Thansk for sending the error messages.
>>
>>The problem is that in your Visual Studio you
>>have enabled the .txx files to be "compilable".
>>
>>This is a common mistake, usually motivated by
>>the need of syntax-coloring those files.
>>
>>Please see the previos related messages in the mailing list:
>>
>>http://public.kitware.com/pipermail/insight-users/2004-May/008692.html
>>http://public.kitware.com/pipermail/insight-users/2004-May/008693.html
>>http://public.kitware.com/pipermail/insight-users/2004-July/009565.html
>>http://public.kitware.com/pipermail/insight-users/2004-July/009567.html
>>http://public.kitware.com/pipermail/insight-users/2004-October/010799.html
>>
>>1) Go to the menu "Tools"
>>2) Select "Options..."
>>3) Select the tab "Projects"
>>4) Select the option "VC++ Build"
>>5) See the field "C/C++ File Extensions"
>>
>>   That field should only contain the following
>>
>>            *.cpp; *.cxx; *.cc; *.c
>>
>>   if you have "*.txx" there, you must remove it.
>>
>>Regards,
>>
>>   Luis
>>
>>--------------------------
>>Mark Wyszomierski wrote:
>>
>>
>>>Hi Luis,
>>>
>>>Below I will paste the error messages. There are 151 of them, all from
>>>project itkvcl, I wish I could format them somewhat more neatly for
>>>you, thanks for taking a look:
>>>
>>>------ Build started: Project: itkvcl, Configuration: Debug Win32 ------
>>>
>>>Compiling...
>>>vcl_multimap.txx
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_bool.h(64) :
>>>warning C4005: 'NOMINMAX' : macro redefinition
>>>        command-line arguments :  see previous definition of 'NOMINMAX'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_algobase.h(185)
>>>: error C2995: 'void vcl_destroy(T *)' : template function has already
>>>been defined
>>>        C:\InsightToolkit-2.0.0\Utilities\vxl\vcl\vcl_new.h(30) : see
>>>declaration of 'vcl_destroy'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_algobase.h(194)
>>>: error C2995: 'void vcl_construct(U *,const V &)' : template function
>>>has already been defined
>>>        C:\InsightToolkit-2.0.0\Utilities\vxl\vcl\vcl_new.h(34) : see
>>>declaration of 'vcl_construct'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: error C2953: 'std::allocator' : template class has already been
>>>defined
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(86)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(86)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(86)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(86)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(88)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(88)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(88)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(88)
>>>: error C2955: 'std::allocator' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83)
>>>: see declaration of 'std::allocator'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(834) :
>>>warning C4346: 'rb_tree<Key,Value,KeyOfValue,Compare,Alloc>::base_ptr'
>>>: dependent name is not a type
>>>        prefix with 'typename' to indicate a type
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(834) :
>>>error C2146: syntax error : missing ')' before identifier 'x_'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(834) :
>>>error C2072: 'rb_tree<Key,Value,KeyOfValue,Compare,Alloc>::__insert' :
>>>initialization of a function
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(836) :
>>>error C2059: syntax error : ')'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C2065: 'Key' : undeclared identifier
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C2065: 'Value' : undeclared identifier
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C2065: 'KeyOfValue' : undeclared identifier
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C2065: 'Compare' : undeclared identifier
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C2065: 'Alloc' : undeclared identifier
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C2955: 'rb_tree' : use of class template requires template
>>>argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(776)
>>>: see declaration of 'rb_tree'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C3861: 'Key': identifier not found, even with argument-dependent
>>>lookup
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C3861: 'Value': identifier not found, even with
>>>argument-dependent lookup
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C3861: 'KeyOfValue': identifier not found, even with
>>>argument-dependent lookup
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C3861: 'Compare': identifier not found, even with
>>>argument-dependent lookup
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C3861: 'Alloc': identifier not found, even with
>>>argument-dependent lookup
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(865) :
>>>error C2955: 'rb_tree' : use of class template requires template
>>>argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(776)
>>>: see declaration of 'rb_tree'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(866) :
>>>error C2143: syntax error : missing ';' before '{'
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(866) :
>>>error C2447: '{' : missing function header (old-style formal list?)
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(881) :
>>>error C2065: 'x' : undeclared identifier
>>>c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_tree.h(887) :
>>>warning C4346: 'rb_tree<Key,Value,KeyOfValue,Compare,Alloc>::key_type'
>>>: dependent name is not a type
>>>        prefix with 'typename' to indicate a type
>>>....<
>>
>>SNIP...SNIP
>>
>>
>>>: error C2955: 'std::mem_fun1_ref_t' : use of class template requires
>>>template argument list
>>>        c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\emulation\vcl_functional.h(550)
>>>: see declaration of 'std::mem_fun1_ref_t'
>>>C:\Program Files\Microsoft Visual Studio .NET
>>>2003\Vc7\include\ostream(604) : fatal error C1903: unable to recover
>>>from previous error(s); stopping compilation
>>>Generating Code...
>>>
>>>Build log was saved at
>>>"file://c:\InsightToolkit-2.0.0\Utilities\vxl\vcl\Debug\BuildLog.htm"
>>>itkvcl - 151 error(s), 10 warning(s)
>>>
>>>// End Error Log //
>>>
>>>On Thu, 10 Feb 2005 15:46:22 -0500, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>>>
>>>
>>>>Hi Mark,
>>>>
>>>>Could you please post the full error messages that you get ?
>>>>
>>>>Turning OFF Examples and Testins is a good idea since most
>>>>users don't submit builds to the Dashboard. Turning them
>>>>OFF (or ON) shouldn't generate any errors.
>>>>
>>>>Hopefully the error messages will help us figure out the
>>>>source of the problem in your installation.
>>>>
>>>>  Thanks
>>>>
>>>>    Luis
>>>>
>>>>------------------------------------
>>>>Mark Wyszomierski wrote:
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I have used earlier versions of ITK with success, I've run into a
>>>>>problem with 2.0. I get a slew of errors when the compiler gets to
>>>>>project itkvcl. When configuring with CMake, I don't change any of the
>>>>>advanced settings, but I do turn off:
>>>>>
>>>>>BUILD_EXAMPLES
>>>>>BUILD_TESTING
>>>>>
>>>>>in the general settings in an attempt to save time compiling ITK and
>>>>>disk space. I running WinXP using visual studio .NET. This is the only
>>>>>project in the build tree that goes awry.
>>>>>
>>>>>An additional note, I still have a copy of ITK 1.8.0 elsewhere on my
>>>>>machine, could this be any source of the problem?
>>>>>
>>>>>Thanks!
>>>>>_______________________________________________
>>>>>Insight-users mailing list
>>>>>Insight-users at itk.org
>>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 





More information about the Insight-users mailing list