[Insight-users] Problem compiling ITK-1.6 ( itkvcl project) with .NET-Version 7.1
jasmuth at seas.upenn.edu
jasmuth at seas.upenn.edu
Sun, 25 Apr 2004 16:50:32 -0400
Hi Luis,
Here is an overview of the results of building VXL - I am listing the first few lines of the compile errors.
vil1 - 12 error(s), 0 warning(s)
vcl - 158 error(s), 23 warning(s)
------ Build started: Project: vil1, Configuration: Debug Win32 ------
Compiling...
vil1_ssd.txx
vil1_resample_image.txx
vil1_ncc.txx
vil1_interpolate.txx
vil1_convolve_simple.txx
vil1_convolve_1d_y.txx
C:\Projects\vxl-1.0.0\vcl\vcl_compiler.h(191) : error C2144: syntax error : 'int' should be preceded by ';'
C:\Projects\vxl-1.0.0\vcl\vcl_compiler.h(191) : error C2501: 'croak' : missing storage-class or type specifiers vil1_convolve_1d_x.txx
C:\Projects\vxl-1.0.0\vcl\vcl_compiler.h(191) : error C2144: syntax error : 'int' should be preceded by ';'
C:\Projects\vxl-1.0.0\vcl\vcl_compiler.h(191) : error C2501: 'croak' : missing storage-class or type specifiers vil1_convolve_1d.txx vil1_convolve.txx
\Projects\vxl-1.0.0\core\vil1\vil1_convolve.txx(11) : error C2061: syntax
< plus more ... >
------ Build started: Project: vcl, Configuration: Debug Win32 ------
Compiling...
vcl_rbtree.txx
c:\Projects\vxl-1.0.0\vcl\emulation\vcl_algorithm.txx(16) : warning C4005: 'VCL_CONTAINABLE_INSTANTIATE' : macro redefinition
c:\Projects\vxl-1.0.0\vcl\iso\vcl_algorithm.txx(11) : see previous definition of 'VCL_CONTAINABLE_INSTANTIATE'
c:\Projects\vxl-1.0.0\vcl\emulation\vcl_algorithm.txx(22) : warning C4005: 'VCL_FIND_INSTANTIATE' : macro redefinition
c:\Projects\vxl-1.0.0\vcl\iso\vcl_algorithm.txx(7) : see previous definition of 'VCL_FIND_INSTANTIATE'
c:\Projects\vxl-1.0.0\vcl\emulation\vcl_algorithm.txx(25) : warning C4005: 'VCL_REMOVE_INSTANTIATE' : macro redefinition
c:\Projects\vxl-1.0.0\vcl\iso\vcl_algorithm.txx(14) : see previous definition of 'VCL_REMOVE_INSTANTIATE' < plus more ...>
vcl_multimap.txx
c:\Projects\vxl-1.0.0\vcl\emulation\vcl_algobase.h(185) : error C2995: 'void vcl_destroy(T *)' : template function has already been defined
C:\Projects\vxl-1.0.0\vcl\vcl_new.h(30) : see declaration of 'vcl_destroy'
c:\Projects\vxl-1.0.0\vcl\emulation\vcl_algobase.h(194) : error C2995: 'void vcl_construct(U *,const V &)' : template function has already been defined
C:\Projects\vxl-1.0.0\vcl\vcl_new.h(34) : see declaration of 'vcl_construct'
c:\Projects\vxl-1.0.0\vcl\emulation\vcl_alloc.h(739) : warning C4346: 'vcl_DA<threads,inst>::obj' : dependent name is not a type
prefix with 'typename' to indicate a type
c:\Projects\vxl-1.0.0\vcl\emulation\vcl_alloc.h(739) : error C2143: syntax error : missing ';' before '*' < plus more ... >
-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Sent: Sunday, April 25, 2004 2:37 PM
To: jasmuth at seas.upenn.edu
Cc: C. Aaron Cois; Lydia Ng; Insight-users at itk.org
Subject: Re: [Insight-users] Problem compiling ITK-1.6 ( itkvcl project) with .NET-Version 7.1
Hi Jane,
Thanks for testing compiling VTK. That certainly
increases the confidence in your compiler.
Since the problem is appearing when compiling
the code from VNL in Insight/Utilities, I wonder
how well the compiler will manage VXL directly.
Could you please try the following:
Dowload VXL from
http://sourceforge.net/projects/vxl
configure it and build it with your compiler.
This will allow us to identify if the problem
is really related to something in VNL or it is
a configuration problem related to ITK.
Please let us know what you find.
Thanks
Luis
--------------------------------
jasmuth at seas.upenn.edu wrote:
> Hi Luis,
>
> Thanks for trying to track this down with me.
>
> In answer to your questions:
>
> I only have Visual Studio .NET 2003 on this computer. The version
> is "Professional" and not "Academic".
>
> I had previously had the 2002 version of .NET, but uninstalled it to save
> space.
>
> Visual Studio 6 has never been on this machine.
>
> I have had no problems building other large solutions with VC.NET
> 2003. Just
> now, as a test, I downloaded and compiled VTK (cmake - everything OFF except
> BUILD_EXAMPLES and VTK_USE_RENDERING option).
> There was only 1 warning:
> "zlib.res : warning LNK4221: no public symbols found; archive member will be
> inaccessible"
>
> The "About Microsoft Visual C++" window reports the following
> versions:
> "Microsoft Development Environment 2003 Version 7.1.3088"
> "Microsoft .NET Framework 1.1 Versino 1.1.4322"
> "Microsoft Visual C++ .NET 69462-112-0631301-18857"
>
> I was able to get a #pragma message() to print when inserted after
> line 79 of
> vcl_compiler.h. This seems to say that it is using _MSC_VER >= 1310.
>
> The first few entries for VC++ Directories - Executable files
> (Tools/Options)
> are:
> $(VCInstallDir)bin
> $(VSInstallDir)Common7\Tools\bin
> $(VSInstallDir)Common7\Tools
> $(VSInstallDir)Common7\ide
>
>
> Please let me know if there is anything else and I will get it to you.
>
> Regards,
>
> Jane
>
>
>
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
> Sent: Sunday, April 25, 2004 9:30 AM
> To: jasmuth at seas.upenn.edu
> Cc: C. Aaron Cois; Lydia Ng; Insight-users at itk.org
> Subject: Re: [Insight-users] Problem compiling ITK-1.6 ( itkvcl project)
> with .NET-Version 7.1
>
>
> 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_
>>>b
>>>ool.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_
>>>t
>>>ree.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_
>>>t
>>>ree.h
>>>
>>>
>>>>(834) : error C2146: syntax error : missing ')' before identifier
>>>>'x_'
>>>>
>>>>
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_
>>>t
>>>ree.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_
>>>t
>>>ree.h
>>>
>>>
>>>>(836) : error C2059: syntax error : ')'
>>>>
>>>>
>>>
>>>c:\Projects\ITK\InsightToolkit-1.6.0\Utilities\vxl\vcl\emulation\vcl_
>>>t
>>>ree.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_
>>>b
>>>ool.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_
>>>a
>>>lloc.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
>>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>