[Insight-users] warning in insightoolkit-2.8.1

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 31 12:38:51 EST 2007


Hi Knoppix,


This is a very common warning in Visual Studio.

Their debugger cannot manage symbols larger than 255 characters.

Most STL symbols surpass that limit, and that results in many
annoying warning from Visual Studio.

Solutions:

1) Silence the warning with the pragma:

      #if defined(_MSC_VER)
      #pragma warning ( disable : 4786 )
      #endif


    OR

2) Do not compile for debug   :-)


    OR


3) Get rid of Windows and install Linux  :-)
    GCC does not have those nearsighted limitations.



Regards,


     Luis


-------------------
knoppix corn wrote:
> haii... i am sorry, may be i ask  a simple Question..
> 
> i build InsightToolkit-2.8.1 with visual studio 6, the result is 0 error 
> and there is 21 warning.
> 
> the examplewarning is :
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xtree(182) : 
> warning C4786: 'std::_Tree<unsigned long,std::pair<unsigned long const 
> ,float>,std::map<unsigned long,float,std::less<unsigned 
> long>,std::allocator<float> >::_Kfn,std::less<unsigned
> long>,std::allocator<float> >::~_Tree<unsigned long,std::pair<unsigned 
> long const ,float>,std::map<unsigned long,float,std::less<unsigned 
> long>,std::allocator<float> >::_Kfn,std::less<unsigned 
> long>,std::allocator<float> >' : identifier was truncate
> d to '255' characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xtree(162) : 
> warning C4786: 'std::_Tree<unsigned long,std::pair<unsigned long const 
> ,float>,std::map<unsigned long,float,std::less<unsigned 
> long>,std::allocator<float> >::_Kfn,std::less<unsigned
> long>,std::allocator<float> >::_Tree<unsigned long,std::pair<unsigned 
> long const ,float>,std::map<unsigned long,float,std::less<unsigned 
> long>,std::allocator<float> >::_Kfn,std::less<unsigned 
> long>,std::allocator<float> >' : identifier was truncated
>  to '255' characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\utility(21) : 
> warning C4786: 'std::pair<std::_Tree<unsigned long,std::pair<unsigned 
> long const ,float>,std::map<unsigned long,float,std::less<unsigned 
> long>,std::allocator<float> >::_Kfn,std::les
> s<unsigned long>,std::allocator<float> 
>  >::iterator,bool>::pair<std::_Tree<unsigned long,std::pair<unsigned 
> long const ,float>,std::map<unsigned long,float,std::less<unsigned 
> long>,std::allocator<float> >::_Kfn,std::less<unsigned long>,std::allocator
> <float> >::iterator,bool>' : identifier was truncated to '255' 
> characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::binary_function<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > const ,itk::SmartPointer<itk::MetaDataObjectBase> >,std::pair<std::ba
> sic_string<char,std::char_traits<char>,std::allocator<char> > const 
> ,itk::SmartPointer<itk::MetaDataObjectBase> >,bool>' : identifier was 
> truncated to '255' characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > const ,itk
> ::SmartPointer<itk::MetaDataObjectBase> 
>  >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::
> allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > >' : 
> identifier was truncated to '255' charac
> ters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > const ,itk
> ::SmartPointer<itk::MetaDataObjectBase> 
>  >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::
> allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::const_iterator' : identifier was truncated
>  to '255' characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > const ,itk
> ::SmartPointer<itk::MetaDataObjectBase> 
>  >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::
> allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::iterator' : identifier was truncated to '2
> 55' characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > const ,itk
> ::SmartPointer<itk::MetaDataObjectBase> 
>  >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::
> allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::_Node' : identifier was truncated to '255'
>  characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::_Tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > const ,itk
> ::SmartPointer<itk::MetaDataObjectBase> 
>  >,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::
> allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::_Kfn,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  > >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::_Redbl' : identifier was truncated to '255
> ' characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_trait
> s<char>,std::allocator<char> > 
>  >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > >' : 
> identifier was truncated to '255' characters in the debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_trait
> s<char>,std::allocator<char> > 
>  >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > 
>  >::value_compare' : identifier was truncated to '255' characters in the 
> debug information
> 
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\new(42) : warning 
> C4786: 
> 'std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> 
>  >,itk::SmartPointer<itk::MetaDataObjectBase>,std::less<std::basic_string<char,std::char_trait
> s<char>,std::allocator<char> > 
>  >,std::allocator<itk::SmartPointer<itk::MetaDataObjectBase> > >::_Kfn' 
> : identifier was truncated to '255' characters in the debug information
> Creating library...
> 
> 
> what is wrong?? can any one help me... thanks very much every body... =)
> 
> ------------------------------------------------------------------------
> The fish are biting.
> Get more visitors 
> <http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50> 
> on your site using Yahoo! Search Marketing. < 
> http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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