[Insight-users] Problem compiling ITK-1.6 ( itkvcl project) with .NET-Version 7.1

Luis Ibanez luis.ibanez at kitware.com
Sun, 25 Apr 2004 09:30:05 -0400


Hi Jane,

Searching on the archives of the users-list, we found
a similar report by Aaron Cois, on Februay 2004

http://www.google.com/search?as_q=vcl_destroy&num=10&hl=en&ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=insight+users&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_nlo=&as_nhi=&as_occt=any&as_dt=i&as_sitesearch=www.itk.org&safe=images

It seems that the ultimate reason for the problem was an
incorrect installation of the compiler. (althought this
was never quite clear).

The code that is giving you trouble is compiled conditionally
depending on what type of compiler you have. What seems to be
going wrong is that your compiler is of one type but it has
been recognized as another type.


ITK is tested daily on VC.Net 2003 (even before release 1.6).
It is then likely that the problem your are facing is related
to the local installation of your compiler.


Do you have other versions of Visual C++ compilers installed
in your machine (in addition to Visual Studio .Net 2003 )  ?

Have you used your current installtion of VC.Net 2003 for
compiling any other serious-size project  ?  (e.g. VTK ?,
CGAL or such). In other words: do you have reasons for trusting
your current VC installation ?

Is your VC.Net the academic license that was released as
an early access to the 7.1 compiler ?



Please let us know.


   Thanks


      Luis


---------
Just for the record: Note that Microsoft has released the
basic compiler (not the IDE) for the current version of
VC++. You may want to try using this set of free tools.




-----------------------------
jasmuth at seas.upenn.edu wrote:
> Hi Luis,
> 
> I had selected "Visual Studio .Net 2003".   
> 
> Please let me know if there is any other information I can provide.
> 
> Thanks,
> 
> Jane
> 
> 
> Quoting Luis Ibanez <luis.ibanez at kitware.com>:
> 
> 
>>Hi Jane,
>>
>>
>>A quick question:
>>
>>   When you ran CMake for configuring ITK, did you make
>>   sure that you selected Visual Studio .Net 2003 as the
>>   compiler to use ?
>>
>>   This is done in CMake by selecting an option in the
>>   right-top corner of the GUI.
>>
>>
>>If you didn't, then please erase the entire binary
>>directory where you were attempting to build ITK,
>>
>>Then restart from scratch: run CMake and make sure
>>that you select the correct compiler on the right-top
>>corner option.
>>
>>
>>
>>    Regards,
>>
>>
>>       Luis
>>
>>
>>------------------------------
>>jasmuth at seas.upenn.edu wrote:
>>
>>
>>>I am having problems getting ITK-1.6.0 to build with .NET 2003 (version
>>
>>7.1, 
>>
>>>(WinXP SP1).   
>>>
>>>Things go along fine until it starts to build the itkvcl project.  
>>>
>>>Any ideas as to what could be going wrong?   
>>>
>>>
>>>Thanks,
>>>
>>>Jane
>>>
>>>
>>>The first few error/warning messages for the problem files are pasted
>>
>>below…
>>
>>>
>>>------ Build started: Project: itkvcl, Configuration: Debug Win32 ------
>>>
>>>Compiling...
>>>
>>>vcl_rbtree.txx
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(16) : warning 
>>>C4005: 'VCL_CONTAINABLE_INSTANTIATE' : macro redefinition
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\iso\vcl_algorithm.txx(11) : see previous definition 
>>>of 'VCL_CONTAINABLE_INSTANTIATE'
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(22) : warning 
>>>C4005: 'VCL_FIND_INSTANTIATE' : macro redefinition
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\iso\vcl_algorithm.txx(7) : see previous definition 
>>>of 'VCL_FIND_INSTANTIATE'
>>>
>>>< plus more warnings >
>>>
>>>
>>>vcl_multimap.txx
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_bool.h
>>
>>>(64) : warning C4005: 'NOMINMAX' : macro redefinition
>>>
>>>        command-line arguments :  see previous definition of 'NOMINMAX'
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0
> 
> \Utilities\vxl\vcl\emulation\vcl_algobase.h
> 
>>>(185) : error C2995: 'void vcl_destroy(T *)' : template function has
>>
>>already 
>>
>>>been defined
>>>
>>>       
>>
>>C:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\vcl_new.h(30) : 
>>
>>>see declaration of 'vcl_destroy'
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0
> 
> \Utilities\vxl\vcl\emulation\vcl_algobase.h
> 
>>>(194) : error C2995: 'void vcl_construct(U *,const V &)' : template
>>
>>function 
>>
>>>has already been defined
>>>
>>>       
>>
>>C:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\vcl_new.h(34) : 
>>
>>>see declaration of 'vcl_construct'
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0
> 
> \Utilities\vxl\vcl\emulation\vcl_defalloc.h
> 
>>>(83) : error C2953: 'std::allocator' : template class has already been
>>
>>defined
>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_defalloc.h(83) : see declaration 
>>>of 'std::allocator'
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0
> 
> \Utilities\vxl\vcl\emulation\vcl_defalloc.h
> 
>>>(86) : error C2955: 'std::allocator' : use of class template requires
>>
>>template 
>>
>>>argument list
>>>
>>>< plus more of the same type error …. – not shown here to keep things brief
>>>
>>>
>>>
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.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:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_tree.h
>>
>>>(834) : error C2146: syntax error : missing ')' before identifier 'x_'
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_tree.h
>>
>>>(834) : error C2072:
>>
>>'rb_tree<Key,Value,KeyOfValue,Compare,Alloc>::__insert' : 
>>
>>>initialization of a function
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_tree.h
>>
>>>(836) : error C2059: syntax error : ')'
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_tree.h
>>
>>>(865) : error C2065: 'Key' : undeclared identifier
>>>
>>>< plus more of same type error… >
>>>
>>>
>>>
>>>vcl_hash_map.txx
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_bool.h
>>
>>>(64) : warning C4005: 'NOMINMAX' : macro redefinition
>>>
>>>        command-line arguments :  see previous definition of 'NOMINMAX'
>>>
>>>
>>
>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_alloc.h
>>
>>>(512) : error C2039: 'alloc' : is not a member of 'std'
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_functional.h(67) : error 
>>>C2953: 'std::unary_function' : template class has already been defined
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_functional.h(67) : see declaration 
>>>of 'std::unary_function'
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_functional.h(75) : error 
>>>C2953: 'std::binary_function' : template class has already been defined
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_functional.h(75) : see declaration 
>>>of 'std::binary_function'
>>>
>>>< plus more of same type error… >
>>>
>>>
>>>
>>>
>>>
>>>vcl_hash.txx
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(16) : warning 
>>>C4005: 'VCL_CONTAINABLE_INSTANTIATE' : macro redefinition
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\iso\vcl_algorithm.txx(11) : see previous definition 
>>>of 'VCL_CONTAINABLE_INSTANTIATE'
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(22) : warning 
>>>C4005: 'VCL_FIND_INSTANTIATE' : macro redefinition
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\iso\vcl_algorithm.txx(7) : see previous definition 
>>>of 'VCL_FIND_INSTANTIATE'
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(25) : warning 
>>>C4005: 'VCL_REMOVE_INSTANTIATE' : macro redefinition
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\iso\vcl_algorithm.txx(14) : see previous definition 
>>>of 'VCL_REMOVE_INSTANTIATE'
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(30) : warning 
>>>C4005: 'VCL_SORT_INSTANTIATE' : macro redefinition
>>>
>>>< plus more of same type warning… >
>>>
>>>
>>>
>>>vcl_hash.txx
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(16) : warning 
>>>C4005: 'VCL_CONTAINABLE_INSTANTIATE' : macro redefinition
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\iso\vcl_algorithm.txx(11) : see previous definition 
>>>of 'VCL_CONTAINABLE_INSTANTIATE'
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\emulation\vcl_algorithm.txx(22) : warning 
>>>C4005: 'VCL_FIND_INSTANTIATE' : macro redefinition
>>>
>>>        c:\Projects\ITK\InsightToolkit-1.6.0
>>>\Utilities\vxl\vcl\iso\vcl_algorithm.txx(7) : see previous definition 
>>>of 'VCL_FIND_INSTANTIATE'
>>>
>>>< plus more of same type warning… >
>>>
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>
>>
>>
>>
> 
> 
>