Thread: MinGW and C++ just won't work, reports bunch of errors..

  1. #1
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163

    MinGW and C++ just won't work, reports bunch of errors..

    Today I downloaded all the packages manually and unpacked them into the 'gcc' directory and added it to the path. When I compile C files, it works. However, when I try compiling ANY C++ code that includes ANY C++ headers it reports ENORMOUSLY much errors, like so (there's so much error's that it can't fit into the console):

    Code:
    In file included from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ios:49
    ,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ostrea
    m:45,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/iostre
    am:45,
                     from test.cpp:1:
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/streambuf: At global scope:
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/streambuf:150: error: '__ena
    ble_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/streambuf:150: error: expect
    ed unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/streambuf:156: error: '__ena
    ble_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/streambuf:156: error: expect
    ed unqualified-id before '<' token
    In file included from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/l
    ocale_facets.h:55,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/b
    asic_ios.h:44,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ios:50
    ,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ostrea
    m:45,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/iostre
    am:45,
                     from test.cpp:1:
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:66
    : error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:66
    : error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:72
    : error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:72
    : error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:78
    : error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:78
    : error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:21
    8: error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:21
    8: error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:27
    9: error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:27
    9: error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:29
    6: error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:29
    6: error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:30
    8: error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:30
    8: error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:32
    0: error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:32
    0: error: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:35
    5: error: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/streambuf_iterator.h:35
    5: error: expected unqualified-id before '<' token
    In file included from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/b
    asic_ios.h:44,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ios:50
    ,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ostrea
    m:45,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/iostre
    am:45,
                     from test.cpp:1:
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.h:2159: e
    rror: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.h:2159: e
    rror: expected unqualified-id before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.h:2181: e
    rror: '__enable_if' in namespace '__gnu_cxx' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.h:2181: e
    rror: expected unqualified-id before '<' token
    In file included from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/l
    ocale_facets.h:2635,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/b
    asic_ios.h:44,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ios:50
    ,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/ostrea
    m:45,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/iostre
    am:45,
                     from test.cpp:1:
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function '_InIter std::num_get<_CharT, _InIter>::_M_extract_float(_InIter,
     _InIter, std::ios_base&, std::_Ios_Iostate&, std::string&) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:195:
    error: 'struct std::string' has no member named 'reserve'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:280:
    error: 'struct std::string' has no member named 'size'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:303:
    error: 'struct std::string' has no member named 'size'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:339:
    error: 'struct std::string' has no member named 'size'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function '_InIter std::num_get<_CharT, _InIter>::_M_extract_int(_InIter, _
    InIter, std::ios_base&, std::_Ios_Iostate&, _ValueT&) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:365:
    error: '__gnu_cxx::__add_unsigned' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:366:
    error: expected nested-name-specifier before '__add_unsigned'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:366:
    error: expected initializer before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:388:
    error: '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:388:
    error: expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:388:
    error: '::__is_signed' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:455:
    error: 'struct std::string' has no member named 'reserve'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:457:
    error: '__unsigned_type' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:460:
    error: '__unsigned_type' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:461:
    error: '__unsigned_type' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:461:
    error: expected `;' before '__result'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:473:
    error: '__result' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:473:
    error: '__smax' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:478:
    error: '__max' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:520:
    error: '__result' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:520:
    error: '__smax' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:525:
    error: '__max' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:539:
    error: 'struct std::string' has no member named 'size'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:551:
    error: 'struct std::string' has no member named 'size'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:552:
    error: '__result' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(_InIter, _
    InIter, std::ios_base&, std::_Ios_Iostate&, float&) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:683:
    error: 'struct std::string' has no member named 'reserve'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(_InIter, _
    InIter, std::ios_base&, std::_Ios_Iostate&, double&) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:696:
    error: 'struct std::string' has no member named 'reserve'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(_InIter, _
    InIter, std::ios_base&, std::_Ios_Iostate&, long double&) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:724:
    error: 'struct std::string' has no member named 'reserve'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(_InIter, _
    InIter, std::ios_base&, std::_Ios_Iostate&, void*&) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:741:
    error: expected initializer before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:745:
    error: '_UIntPtrType' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:745:
    error: expected `;' before '__ul'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:746:
    error: '__ul' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function '_OutIter std::num_put<_CharT, _OutIter>::_M_insert_int(_OutIter,
     std::ios_base&, _CharT, _ValueT) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:835:
    error: '__gnu_cxx::__add_unsigned' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:836:
    error: expected nested-name-specifier before '__add_unsigned'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:836:
    error: expected initializer before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:854:
    error: '__unsigned_type' does not name a type
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:857:
    error: '__u' was not declared in this scope
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:880:
    error: '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:880:
    error: expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:880:
    error: '::__is_signed' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function '_OutIter std::num_put<_CharT, _OutIter>::_M_insert_float(_OutIte
    r, std::ios_base&, _CharT, char, _ValueT) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:968:
    error: '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:968:
    error: expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:968:
    error: '::__digits10' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:996:
    error: '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:996:
    error: expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:996:
    error: '::__max_exponent10' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc: In m
    ember function 'virtual _OutIter std::num_put<_CharT, _OutIter>::do_put(_OutIter
    , std::ios_base&, _CharT, const void*) const':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:1171:
     error: expected initializer before '<' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:1176:
     error: expected type-specifier before '_UIntPtrType'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:1176:
     error: expected `>' before '_UIntPtrType'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:1176:
     error: expected `(' before '_UIntPtrType'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/locale_facets.tcc:1176:
     error: '_UIntPtrType' was not declared in this scope
    In file included from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/istrea
    m:836,
                     from c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/iostre
    am:46,
                     from test.cpp:1:
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc: In member
    function 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Trait
    s>::operator>>(short int&)':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:127: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:127: error:
     expected primary-expression before 'short'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:127: error:
     expected `)' before 'short'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc: In member
    function 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Trait
    s>::operator>>(int&)':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:147: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:147: error:
     expected primary-expression before 'int'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:147: error:
     expected `)' before 'int'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc: In member
    function 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Trait
    s>::ignore(std::streamsize)':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:477: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:477: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:477: error:
     '::__max' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:481: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:481: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:481: error:
     '::__min' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:489: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:489: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:489: error:
     '::__max' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc: In member
    function 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Trait
    s>::ignore(std::streamsize, typename _Traits::int_type)':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:534: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:534: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:534: error:
     '::__max' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:539: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:539: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:539: error:
     '::__min' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:547: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:547: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:547: error:
     '::__max' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:554: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:554: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:554: error:
     '::__max' has not been declared
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc: In functio
    n 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_Char
    T, _Traits>&, _CharT2*)':
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:908: error:
     '__numeric_traits' is not a member of '__gnu_cxx'
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:908: error:
     expected primary-expression before '>' token
    c:\dev\gcc\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/istream.tcc:908: error:
     '::__max' has not been declared
    I don't know what this is, anyone has a solution?
    Last edited by hauzer; 05-24-2009 at 03:00 PM.
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  2. #2
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    First, show us the code and the command line you're compiling with. Second, what version of gcc? You should be using 3.4.5 - if you're using the technology preview of gcc4, there are files missing - they're in the gjc packages. (Don't ask me why.)

    According to the manifests I keep, the following is the minimal set of packages required for gcc/g++:
    Code:
     1 gcc-core-3.4.5-20060117-3.tar.gz
     2 gcc-g++-3.4.5-20060117-3.tar.gz
     3 binutils-2.19-mingw32-rc1-bin.tar.gz
     4 mingw32-make-3.81-20080326-3.tar.gz
     5 mingwrt-3.15.1-mingw32.tar.gz
     6 w32api-3.12-mingw32-dev.tar.gz
     7 mingw-utils-0.3.tar.gz
    Edit: Also, you'll get nicer output if you redirect the output to a file, instead of copying directly from the terminal -- you won't get those spurious newlines.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  3. #3
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    GCJ?? Yes, I'm using 4.3.0 and the command line is gcc test.cpp or g++ test.cpp. If so, I'll download GCJ and report back.
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  4. #4
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Quote Originally Posted by hauzer View Post
    GCJ?? Yes, I'm using 4.3.0 and the command line is gcc test.cpp or g++ test.cpp. If so, I'll download GCJ and report back.
    You don't need the whole thing, just the C++ files that are in the package. My memory says it's fairly obvious where they are.
    The MinGW maintainers note that this will be corrected with the next release. Whenever that is.

    I've had bad luck with gcc4. Some packages won't build at all with it.

    Edit: the gcc test.cpp command line will fail, but not with the errors you're seeing. The g++ test.cpp should have worked (or failed with different errors).
    Last edited by Cactus_Hugger; 05-24-2009 at 03:15 PM.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  5. #5
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    ... It's a bit hard to download 128mb's with a 44kbps.. Oh well, I'll get it by tomorrow. Thanks for help!
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  6. #6
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    I've just got GCC3 and it works.. phew..
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    I have used the GCC4 from MinGW, and I don't recall having done anything special...

  8. #8
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    What a failure from GNU, I can't believe it. I downloaded GCJ and the C++ files in it were headers located at ...\lib\gcc\mingw32\4.3.0\include\c++\ and now it works, don't they think about dial-up users??
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  9. #9
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Quote Originally Posted by cyberfish View Post
    I have used the GCC4 from MinGW, and I don't recall having done anything special...
    I think the distribution error is only present in the most recent release (May 2008, IIRC), so if you downloaded before then, you're fine. Also, if you've never used the C++ compiler, you're also fine.

    I'm not sure if they have a "all together" installer exe or not for gcc4, I'd imagine that if they did that might work? I regularly install from just the binary tar.gz's, so I have no idea.

    Most things work alright with gcc4, but IIRC, icu does not compile. There may be others, so at that point I fell back to gcc 3.4.5 until gcc 4 reachs a stable point. (If the MinGW community ever gets there...)

    Quote Originally Posted by hauzer View Post
    don't they think about dial-up users
    Well, it is java... did you expect it to be small?
    Last edited by Cactus_Hugger; 05-25-2009 at 02:44 PM.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  10. #10
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Just an aside, but whats the reason for not using VSExpress if you are targetting windows?

  11. #11
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    Should I explain my philosophies of computer freedom and all-user contributing?
    I like GNU, I like freedom as an beer, so in speech. I don't hate M$, but I don't like them much, I have my reasons. Another thing is that MinGW is not unusable compared to VC (as some may think), it is very practical and once you get into the trick it's better than it.
    You may ask why am I using Windows then.. Well the answer is simple, I'm too lazy to get a Linux distro (as you've seen from my connection). I have my friend download slackware, so Linux may not be a far future from now.

    Quote Originally Posted by Cactus_Hugger
    Well, it is java... did you expect it to be small?
    Heh, you've got a point there..
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  12. #12
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    There may be others, so at that point I fell back to gcc 3.4.5 until gcc 4 reachs a stable point. (If the MinGW community ever gets there...)
    GCC 4 has been stable for quite a while, now. Virtually all Linux distributions have switched to GCC 4 as the default compiler for quite a few years already.

    It's just MinGW, or legacy code.

    Just an aside, but whats the reason for not using VSExpress if you are targetting windows?
    For me, it's because I write my code on Linux, with GCC. It's a lot less work getting it to compile in MinGW GCC than a totally different compiler (MSVC). And also I can reuse my Makefiles, etc.

    I am a lot more familiar with GCC, too.

    What's the reason for NOT using GCC?

  13. #13
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by hauzer View Post
    Should I explain my philosophies of computer freedom and all-user contributing?
    I like GNU, I like freedom as an beer, so in speech. I don't hate M$, but I don't like them much, I have my reasons. Another thing is that MinGW is not unusable compared to VC (as some may think), it is very practical and once you get into the trick it's better than it.
    I'm not taking sides here, I use MinGW myself for a lot of things that VS can't (easily) do, like writing single application boot images. I'm just suggesting that if you are already targetting windows for your application, it would be obtuse not to use VS as it is in my professional opinion much more suited to the task of writing windows applications than MinGW.

  14. #14
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    I know you're neutral. It's just that I'm not a professional programmer, I'm more of a hobbyist, so big badass IDE's are not well suited for me. Thanks for trying, though.
    Last edited by hauzer; 05-26-2009 at 06:24 AM.
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  15. #15
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    Just an aside, but whats the reason for not using VSExpress if you are targetting windows?
    It's a fair question. Mostly habit, I suppose - I grew up programming on a Windows 98 system, which MSVS Express would not install on. gcc is also much more lax on disk requirements (although it lacks an IDE, but I am quite comfortable in Notepad++). I usually carry a copy of gcc/g++ on a thumbdrive.

    GCC 4 has been stable for quite a while, now. Virtually all Linux distributions have switched to GCC 4 as the default compiler for quite a few years already.
    Sorry, I suppose that needed a bit of qualification. The MinGW distribution of gcc 4 only - on any other OS, absolutely: you should be using gcc 4.
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

Popular pages Recent additions subscribe to a feed