[Insight-users] InsightApplication installation Questions

qi yang tinaqiyang at gmail.com
Thu Jul 8 17:05:56 EDT 2010


Hi all,

I am newbie of ITK.
I try to build GaussianFilter project from InsightApplications 3.18
and keep getting an error as "C:\Program Files\Microsoft Visual Studio
8\VC\include\xlocnum(590) : error C2872: 'uintptr_t' : ambiguous
symbol".
I am using VS 2005 on windows XP sp2. ITK, VTK and FLSK were compiled
and built without error.
I searched and got previous post suggestion to download newest version
from CVS (pls see details in Previous post section).
I tried but still same errors are seen.

Can anyone help me or recommend a good step by step installation tutorial?
I am really frustrated...

Thanks,
Tina


Error details:

2>fltkImageViewerGUI.cxx
2>C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(590) :
error C2872: 'uintptr_t' : ambiguous symbol
2>        could be 'C:\Program Files\Microsoft Visual Studio
8\VC\include\vadefs.h(52) : __w64 unsigned int uintptr_t'
2>        or 'c:\ty\insighttoolkit-3.18.0\code\common\itkIntTypes.h(144)
: itk::uintptr_t'
2>        C:\Program Files\Microsoft Visual Studio
8\VC\include\xlocnum(566) : while compiling class template member
function 'std::istreambuf_iterator<_Elem,_Traits>
std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base
&,std::ios_base::iostate &,void *&) const'
2>        with
2>        [
2>            _Elem=char,
2>            _Traits=std::char_traits<char>,
2>            _InIt=std::istreambuf_iterator<char,std::char_traits<char>>
2>        ]
2>        C:\Program Files\Microsoft Visual Studio
8\VC\include\xlocnum(1365) : see reference to class template
instantiation 'std::num_get<_Elem,_InIt>' being compiled
2>        with
2>        [
2>            _Elem=char,
2>            _InIt=std::istreambuf_iterator<char,std::char_traits<char>>
2>        ]

3>liFilterConsoleGUI.cxx
3>GaussianFilter.cxx
3>C:\Program Files\Microsoft Visual Studio 8\VC\include\xlocnum(590) :
error C2872: 'uintptr_t' : ambiguous symbol
3>        could be 'C:\Program Files\Microsoft Visual Studio
8\VC\include\vadefs.h(52) : __w64 unsigned int uintptr_t'
3>        or 'c:\ty\insighttoolkit-3.18.0\code\common\itkIntTypes.h(144)
: itk::uintptr_t'
3>        C:\Program Files\Microsoft Visual Studio
8\VC\include\xlocnum(566) : while compiling class template member
function 'std::istreambuf_iterator<_Elem,_Traits>
std::num_get<_Elem,_InIt>::do_get(_InIt,_InIt,std::ios_base
&,std::ios_base::iostate &,void *&) const'
3>        with
3>        [
3>            _Elem=char,
3>            _Traits=std::char_traits<char>,
3>            _InIt=std::istreambuf_iterator<char,std::char_traits<char>>
3>        ]
3>        C:\Program Files\Microsoft Visual Studio
8\VC\include\xlocnum(1365) : see reference to class template
instantiation 'std::num_get<_Elem,_InIt>' being compiled
3>        with
3>        [
3>            _Elem=char,
3>            _InIt=std::istreambuf_iterator<char,std::char_traits<char>>
3>        ]


Previous post:

This problem has been fixed in the CVS HEAD
version of Insight Applications.
The problem is cause by the irresponsible use of "using namespace itk"
in several of the applications inside  InsightApplications.
The C++ statement:

                 "using namespace ..."

is the signature of a lazy developer (or one with
a poor text editor), and that should be banned
from the C++ language.Opening a namespace is an absurd thing to do,
since it can only result in conflicts between declarations. (which is
what you are seeing now
in your build).We have now removed all occurrences of "using namespace
..." from the InsigthApplications source tree.

Please give it a try at a CVS updated version of InsightApplications.


More information about the Insight-users mailing list