[Insight-users] Visual C++ 8 (express edition) compile error
Kalle Pahajoki
kalpaha at st.jyu.fi
Mon Jul 31 01:46:30 EDT 2006
Hi
I've run into a problem compiling WrapITK with Visual C++ Express
Edition 8.0, but the error as such is not in the WrapITK code, so I
think it makes sense to post this here.
The log of the error is pasted below, but the gist of the issue seems to
be that the function next_prime() in Code/Common/itk_hastable.h calls
std::lower_bound, which is implemented in the
InsightToolkit\bin\Vc8Ex\include\algorithm and assumes it is passed an
iterator, while the next_prime() is passing it an unsigned long.
There seemed to be a mention on the list earlier, but no fix was
suggested. I would like to hear if someone has a fix for this, or if
someone could suggest whom to pester this further with.
H:\WrapITK>nmake
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
Generating wrap_itkLabelStatisticsImageFilter.xml
In file included from H:/InsightToolkit-2.8.1/Code/Common/itk_hash_map.h:73,
from H:/InsightToolkit-2.8.1/Code/BasicFilters/itkLabelStatisticsImageFilter.h:24,
from H:/WrapITK/Modules/Calculators/wrap_itkLabelStatisticsImageFilter.cxx:17:
H:/InsightToolkit/bin/Vc8ex/Include/xutility: In instantiation of `std::_Checked_iterator_base_helper2<const long unsigned int*, true>':
H:/InsightToolkit/bin/Vc8ex/Include/xutility:934: instantiated from `std::_Checked_iterator_base_helper<const long unsigned int*>'
H:/InsightToolkit/bin/Vc8ex/Include/algorithm:2004: instantiated from `_FwdIt std::lower_bound(_FwdIt, _FwdIt, const _Ty&) [with _FwdIt = const long unsigned
int*, _Ty = long unsigned int]'
H:/InsightToolkit-2.8.1/Code/Common/itk_hashtable.h:278: instantiated from here
H:/InsightToolkit/bin/Vc8ex/Include/xutility:910: error: `const long unsigned
int*' is not a class, struct, or union type
H:/InsightToolkit/bin/Vc8ex/Include/xutility: In instantiation of `std::_Checked_iterator_base_helper<const long unsigned int*>':
H:/InsightToolkit/bin/Vc8ex/Include/algorithm:2004: instantiated from `_FwdIt std::lower_bound(_FwdIt, _FwdIt, const _Ty&) [with _FwdIt = const long unsigned
int*, _Ty = long unsigned int]'
H:/InsightToolkit-2.8.1/Code/Common/itk_hashtable.h:278: instantiated from here
H:/InsightToolkit/bin/Vc8ex/Include/xutility:934: error: no type named `
_Checked_iterator_base_type' in `class
std::_Checked_iterator_base_helper2<const long unsigned int*, true>'
H:/InsightToolkit/bin/Vc8ex/Include/xutility: In instantiation of `std::_Checked_iterator_base_helper<const long unsigned int*>':
H:/InsightToolkit/bin/Vc8ex/Include/algorithm:2004: instantiated from `_FwdIt std::lower_bound(_FwdIt, _FwdIt, const _Ty&) [with _FwdIt = const long unsigned
int*, _Ty = long unsigned int]'
H:/InsightToolkit-2.8.1/Code/Common/itk_hashtable.h:278: instantiated from here
H:/InsightToolkit/bin/Vc8ex/Include/xutility:936: error: no type named `
_Checked_iterator_base_type' in `class
std::_Checked_iterator_base_helper2<const long unsigned int*, true>'
H:/InsightToolkit/bin/Vc8ex/Include/xutility: In instantiation of `std::_Checked_iterator_base_helper<const long unsigned int*>':
H:/InsightToolkit/bin/Vc8ex/Include/algorithm:2004: instantiated from `_FwdIt std::lower_bound(_FwdIt, _FwdIt, const _Ty&) [with _FwdIt = const long unsigned
int*, _Ty = long unsigned int]'
H:/InsightToolkit-2.8.1/Code/Common/itk_hashtable.h:278: instantiated from here
H:/InsightToolkit/bin/Vc8ex/Include/xutility:937: error: no type named `
_Checked_iterator_base_type' in `class
std::_Checked_iterator_base_helper2<const long unsigned int*, true>'
H:/InsightToolkit/bin/Vc8ex/Include/algorithm: In function `_FwdIt
std::lower_bound(_FwdIt, _FwdIt, const _Ty&) [with _FwdIt = const long
unsigned int*, _Ty = long unsigned int]':
H:/InsightToolkit-2.8.1/Code/Common/itk_hashtable.h:278: instantiated from here
H:/InsightToolkit/bin/Vc8ex/Include/algorithm:2004: error: no matching function
for call to `_Checked_base(const long unsigned int*&)'
H:/InsightToolkit/bin/Vc8ex/Include/algorithm:2004: error: no matching function
for call to `_Checked_base(const long unsigned int*&)'
NMAKE : fatal error U1077: 'H:\InsightToolkit\bin\gccxml.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition not smart enough to debug it. -- Brian W. Kerninghan
More information about the Insight-users
mailing list