[Insight-users] InsightToolkit does not work with <complex>, <iostream> and other headers

Christian May christian.peter.may at gmail.com
Tue Jul 27 06:51:14 EDT 2010


Hi everybody,

I installed InsightToolkit-3.20.0 and want to compile a program using
it. My compiler is g++ 4.4.1 under openSUSE 11.2 (x86_64).

However, the following simple test program:

#include <complex>
int main() {
}

cannot be compiled if invoke it like that:

g++ -c test.cpp -I/usr/local/include/InsightToolkit/Utilities/itksys
-I/usr/local/include/InsightToolkit/Utilities/

I attach the resulting errors below. Did anybody see that before? I
guess there is some configuration error. Any hint is appreciated!
Many thanks in advance
Chris

g++ -c test.cpp -I/usr/local/include/InsightToolkit/Utilities/itksys
-I/usr/local/include/InsightToolkit/Utilities/
In file included from /usr/include/c++/4.4/iosfwd:42,
                 from /usr/include/c++/4.4/ios:39,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/bits/postypes.h:98: error: ‘ptrdiff_t’ does not
name a type
In file included from /usr/include/c++/4.4/bits/stl_algobase.h:67,
                 from /usr/include/c++/4.4/bits/char_traits.h:41,
                 from /usr/include/c++/4.4/ios:41,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:102: error:
expected type-specifier before ‘ptrdiff_t’
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:102: error:
expected ‘>’ before ‘ptrdiff_t’
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:113: error:
‘_Pointer’ does not name a type
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:115: error:
‘_Reference’ does not name a type
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:139: error:
‘ptrdiff_t’ does not name a type
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:149: error:
‘ptrdiff_t’ does not name a type
In file included from /usr/include/c++/4.4/bits/stl_algobase.h:69,
                 from /usr/include/c++/4.4/bits/char_traits.h:41,
                 from /usr/include/c++/4.4/ios:41,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/bits/stl_iterator.h:95: error: wrong number of
template arguments (5, should be 3)
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:104: error:
provided for ‘template<class _Category, class _Tp, class _Distance>
struct std::iterator’
/usr/include/c++/4.4/bits/stl_iterator.h:390: error: wrong number of
template arguments (5, should be 3)
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:104: error:
provided for ‘template<class _Category, class _Tp, class _Distance>
struct std::iterator’
/usr/include/c++/4.4/bits/stl_iterator.h:474: error: wrong number of
template arguments (5, should be 3)
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:104: error:
provided for ‘template<class _Category, class _Tp, class _Distance>
struct std::iterator’
/usr/include/c++/4.4/bits/stl_iterator.h:561: error: wrong number of
template arguments (5, should be 3)
/usr/include/c++/4.4/bits/stl_iterator_base_types.h:104: error:
provided for ‘template<class _Category, class _Tp, class _Distance>
struct std::iterator’
In file included from /usr/include/c++/4.4/bits/char_traits.h:41,
                 from /usr/include/c++/4.4/ios:41,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/bits/stl_algobase.h: In static member function
‘static _Tp* std::__copy_move_backward<_IsMove, true,
std::random_access_iterator_tag>::__copy_move_b(const _Tp*, const
_Tp*, _Tp*)’:
/usr/include/c++/4.4/bits/stl_algobase.h:574: error: ‘ptrdiff_t’ does
not name a type
/usr/include/c++/4.4/bits/stl_algobase.h:575: error: ‘_Num’ was not
declared in this scope
In file included from /usr/include/c++/4.4/ios:41,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/bits/char_traits.h: At global scope:
/usr/include/c++/4.4/bits/char_traits.h:111: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h:113: error: ‘size_t’ in
namespace ‘std’ does not name a type
/usr/include/c++/4.4/bits/char_traits.h:117: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h:120: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h:123: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h:126: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h:152: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h: In static member function
‘static int __gnu_cxx::char_traits<_CharT>::compare(const _CharT*,
const _CharT*, int)’:
/usr/include/c++/4.4/bits/char_traits.h:154: error: ‘size_t’ is not a
member of ‘std’
/usr/include/c++/4.4/bits/char_traits.h:154: error: expected ‘;’
before ‘__i’
/usr/include/c++/4.4/bits/char_traits.h:154: error: ‘__i’ was not
declared in this scope
/usr/include/c++/4.4/bits/char_traits.h: At global scope:
/usr/include/c++/4.4/bits/char_traits.h:164: error: expected
constructor, destructor, or type conversion before ‘char_traits’
/usr/include/c++/4.4/bits/char_traits.h:176: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h: In static member function
‘static const _CharT* __gnu_cxx::char_traits<_CharT>::find(const
_CharT*, int, const _CharT&)’:
/usr/include/c++/4.4/bits/char_traits.h:178: error: ‘size_t’ is not a
member of ‘std’
/usr/include/c++/4.4/bits/char_traits.h:178: error: expected ‘;’
before ‘__i’
/usr/include/c++/4.4/bits/char_traits.h:178: error: ‘__i’ was not
declared in this scope
/usr/include/c++/4.4/bits/char_traits.h: At global scope:
/usr/include/c++/4.4/bits/char_traits.h:187: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h:196: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/bits/char_traits.h:206: error: ‘std::size_t’ has
not been declared
In file included from /usr/include/c++/4.4/ext/new_allocator.h:33,
                 from
/usr/include/c++/4.4/x86_64-suse-linux/bits/c++allocator.h:34,
                 from /usr/include/c++/4.4/bits/allocator.h:48,
                 from /usr/include/c++/4.4/string:43,
                 from /usr/include/c++/4.4/bits/locale_classes.h:42,
                 from /usr/include/c++/4.4/bits/ios_base.h:43,
                 from /usr/include/c++/4.4/ios:43,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/new:91: error: declaration of ‘operator new’ as
non-function
/usr/include/c++/4.4/new:91: error: ‘size_t’ is not a member of ‘std’
/usr/include/c++/4.4/new:92: error: declaration of ‘operator new []’
as non-function
/usr/include/c++/4.4/new:92: error: ‘size_t’ is not a member of ‘std’
/usr/include/c++/4.4/new:95: error: declaration of ‘operator new’ as
non-function
/usr/include/c++/4.4/new:95: error: ‘size_t’ is not a member of ‘std’
/usr/include/c++/4.4/new:95: error: expected primary-expression before
‘const’
/usr/include/c++/4.4/new:96: error: declaration of ‘operator new []’
as non-function
/usr/include/c++/4.4/new:96: error: ‘size_t’ is not a member of ‘std’
/usr/include/c++/4.4/new:96: error: expected primary-expression before
‘const’
/usr/include/c++/4.4/new:101: error: declaration of ‘operator new’ as
non-function
/usr/include/c++/4.4/new:101: error: ‘size_t’ is not a member of ‘std’
/usr/include/c++/4.4/new:101: error: expected primary-expression
before ‘void’
/usr/include/c++/4.4/new:102: error: declaration of ‘operator new []’
as non-function
/usr/include/c++/4.4/new:102: error: ‘size_t’ is not a member of ‘std’
/usr/include/c++/4.4/new:102: error: expected primary-expression
before ‘void’
In file included from
/usr/include/c++/4.4/x86_64-suse-linux/bits/c++allocator.h:34,
                 from /usr/include/c++/4.4/bits/allocator.h:48,
                 from /usr/include/c++/4.4/string:43,
                 from /usr/include/c++/4.4/bits/locale_classes.h:42,
                 from /usr/include/c++/4.4/bits/ios_base.h:43,
                 from /usr/include/c++/4.4/ios:43,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/ext/new_allocator.h:39: error: ‘std::size_t’ has
not been declared
/usr/include/c++/4.4/ext/new_allocator.h:40: error: ‘std::ptrdiff_t’
has not been declared
/usr/include/c++/4.4/ext/new_allocator.h:55: error: ‘ptrdiff_t’ does
not name a type
In file included from /usr/include/c++/4.4/string:43,
                 from /usr/include/c++/4.4/bits/locale_classes.h:42,
                 from /usr/include/c++/4.4/bits/ios_base.h:43,
                 from /usr/include/c++/4.4/ios:43,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/bits/allocator.h:68: error: ‘ptrdiff_t’ does not
name a type
/usr/include/c++/4.4/bits/allocator.h:90: error: ‘ptrdiff_t’ does not
name a type
In file included from /usr/include/c++/4.4/string:46,
                 from /usr/include/c++/4.4/bits/locale_classes.h:42,
                 from /usr/include/c++/4.4/bits/ios_base.h:43,
                 from /usr/include/c++/4.4/ios:43,
                 from /usr/include/c++/4.4/istream:40,
                 from /usr/include/c++/4.4/sstream:39,
                 from /usr/include/c++/4.4/complex:47,
                 from test.cpp:1:
/usr/include/c++/4.4/bits/ostream_insert.h:43: error: ‘streamsize’ has
not been declared
/usr/include/c++/4.4/bits/ostream_insert.h: In function ‘void
std::__ostream_write(std::basic_ostream<_CharT, _Traits>&, const
_CharT*, int)’:
/usr/include/c++/4.4/bits/ostream_insert.h:48: error: ‘streamsize’
does not name a type
/usr/include/c++/4.4/bits/ostream_insert.h:49: error: ‘__put’ was not
declared in this scope
/usr/include/c++/4.4/bits/ostream_insert.h: At global scope:
/usr/include/c++/4.4/bits/ostream_insert.h:55: error: ‘streamsize’ has
not been declared
/usr/include/c++/4.4/bits/ostream_insert.h:75: error: ‘streamsize’ has
not been declared
/usr/include/c++/4.4/bits/ostream_insert.h: In function
‘std::basic_ostream<_CharT, _Traits>&
std::__ostream_insert(std::basic_ostream<_CharT, _Traits>&, const
_CharT*, int)’:
/usr/include/c++/4.4/bits/ostream_insert.h:85: error: ‘streamsize’
does not name a type
/usr/include/c++/4.4/bits/ostream_insert.h:86: error: ‘__w’ was not
declared in this scope
/usr/include/c++/4.4/bits/ostream_insert.h: At global scope:
/usr/include/c++/4.4/bits/ostream_insert.h:117: error: ‘streamsize’
has not been declared
/usr/include/c++/4.4/bits/ostream_insert.h:121: error: ‘streamsize’
has not been declared


More information about the Insight-users mailing list