[Insight-users] Problem with VS 10 and itk 3.18.0

Luis Ibanez luis.ibanez at kitware.com
Mon Apr 19 18:24:13 EDT 2010


Hi Mostafizur,


   ITK (any version) does not support Visual Studio 10 yet.


There were some structural changes made to Visual Studio 10,
that require CMake to manage the configuration process in a
way different from what is done with Visual Studio 9.


We will have Visual Studio 10 support for ITK in our top priorities
for the development cycle of ITK 3.19.



     Regards,


           Luis



---------------------------------------------------------------------------------------
On Mon, Apr 19, 2010 at 4:42 PM, Md Rahman <rahman at sfu.ca> wrote:

> Hi ,
>
>  I was trying to compile the Hello World program using the latest version
> of ITK release and MS Visual Studio 10 trial version. Then I was getting the
> following error--
>      LINK : fatal error LNK1104: cannot open file "ITKCommon.lib"
>
>  Every time I was building the project using only Debug mode. Then I
> realized that I had to open and compile the ITK.sln file from the binary
> directory. But when I tried to compile the ITK.sln, it fails to build and
> giving me errors like--
>
> """
>
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(636)
> : see reference to class template instantiation
> 'itk::hashtable<Value,Key,HashFcn,ExtractKey,EqualKey,Alloc>' being compiled
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(354)
> : see declaration of 'itk::operator =='
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(1154):
> error C2953: 'std::identity' : class template has already been defined
> 28>          C:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\include\utility(66) : see declaration of 'std::identity'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(230)
> : see reference to class template instantiation
> 'itk::hash_map<Key,T,HashFcn,EqualKey,Alloc>' being compiled
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(327)
> : see reference to class template instantiation
> 'itk::hash_multimap<Key,T,HashFcn,EqualKey,Alloc>' being compiled
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(138)
> : see reference to class template instantiation
> 'itk::hashtable<Value,Key,HashFcn,ExtractKey,EqualKey,Alloc>' being compiled
> 28>          with
> 28>          [
> 28>              Value=std::pair<const unsigned long,unsigned long>,
> 28>              Key=unsigned long,
> 28>              HashFcn=itk::hash<unsigned long>,
> 28>              ExtractKey=std::select1st<std::pair<const unsigned
> long,unsigned long>>,
> 28>              EqualKey=std::equal_to<unsigned long>,
> 28>              Alloc=std::allocator<char>
> 28>          ]
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itkEquivalencyTable.h(61)
> : see reference to class template instantiation
> 'itk::hash_map<Key,T,HashFcn>' being compiled
> 28>          with
> 28>          [
> 28>              Key=unsigned long,
> 28>              T=unsigned long,
> 28>              HashFcn=itk::hash<unsigned long>
> 28>          ]
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
>
> """
>
>
> And
>
> """
>  28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(636)
> : see reference to class template instantiation
> 'itk::hashtable<Value,Key,HashFcn,ExtractKey,EqualKey,Alloc>' being compiled
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(354)
> : see declaration of 'itk::operator =='
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(1154):
> error C2953: 'std::identity' : class template has already been defined
> 28>          C:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\include\utility(66) : see declaration of 'std::identity'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(230)
> : see reference to class template instantiation
> 'itk::hash_map<Key,T,HashFcn,EqualKey,Alloc>' being compiled
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(327)
> : see reference to class template instantiation
> 'itk::hash_multimap<Key,T,HashFcn,EqualKey,Alloc>' being compiled
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(292):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(138)
> : see reference to class template instantiation
> 'itk::hashtable<Value,Key,HashFcn,ExtractKey,EqualKey,Alloc>' being compiled
> 28>          with
> 28>          [
> 28>              Value=std::pair<const unsigned long,unsigned long>,
> 28>              Key=unsigned long,
> 28>              HashFcn=itk::hash<unsigned long>,
> 28>              ExtractKey=std::select1st<std::pair<const unsigned
> long,unsigned long>>,
> 28>              EqualKey=std::equal_to<unsigned long>,
> 28>              Alloc=std::allocator<char>
> 28>          ]
> 28>
>  c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itkOneWayEquivalencyTable.h(61)
> : see reference to class template instantiation
> 'itk::hash_map<Key,T,HashFcn>' being compiled
> 28>          with
> 28>          [
> 28>              Key=unsigned long,
> 28>              T=unsigned long,
> 28>              HashFcn=itk::hash<unsigned long>
> 28>          ]
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hashtable.h(474):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2146: syntax error : missing ';' before identifier
> 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2433: 'itk::==' : 'friend' not permitted on data declarations
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2365: 'itk::operator ==' : redefinition; previous definition was
> 'function'
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C2091: function returns function
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int
> 28>c:\users\rajib\documents\downloads\insighttoolkit-3.18.0\insighttoolkit-3.18.0\code\common\itk_hash_map.h(188):
> warning C4183: 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT': missing return type;
> assumed to be a member function returning 'int'
>
> """
>
>
>   The all other builds are successful. I'm quite new with ITK. So, I'm not
> quite sure whether I'm doing anything wrong, or the problem with the latest
> release of ITK, or with the latest realease of MS VS 10 (trial version).
>
>
>  This is my first e-mail to this group and extremely sorry for such a weird
> one.
>
>
>  Any help will be greatly appreciated.
>
>  Thanks and Regards,
>
>  Md. Mostafizur Rahman (Rajib)
>  Department of Computing Science
>  Simon Fraser University
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100419/4af69538/attachment-0001.htm>


More information about the Insight-users mailing list