Thread: C++ compilation issues

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    1

    C++ compilation issues

    I've found some software I would like to use that is quite rough around the edges. It is called Karmin and can be downloaded from sourceforge:

    http://karmin.sourceforge.net/

    Part of the code compiles (although not so cleanly), but the 'img' and serial sniffing code seem to have problems. I run libtoolize in src/ then autoconf, and start make. I end up with gcc spewing page upon page of error messages. Would someone be kind enough to tell me how to fix this? I have experience with C, but no C++ and this seems to be beyond me.

    The source archive can be downloaded here:

    http://karmin.sourceforge.net/karmin-0.0.0pre10.tar.gz

    Code:
    make  all-recursive
    make[1]: Entering directory `/home/mohr/garmin/karmin-0.0.0pre10/src'
    Making all in support
    make[2]: Entering directory `/home/mohr/garmin/karmin-0.0.0pre10/src/support'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `/home/mohr/garmin/karmin-0.0.0pre10/src/support'
    Making all in sniff_ser
    make[2]: Entering directory `/home/mohr/garmin/karmin-0.0.0pre10/src/sniff_ser'
    if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../support    -g -O2 -MT sniff_ser.o -MD -MP -MF ".deps/sniff_ser.Tpo" -c -o sniff_ser.o sniff_ser.C; \
    then mv -f ".deps/sniff_ser.Tpo" ".deps/sniff_ser.Po"; else rm -f ".deps/sniff_ser.Tpo"; exit 1; fi
    In file included from /usr/include/c++/3.3.4/backward/strstream:51,
                     from ../support/CmdLineArg.h:33,
                     from sniff_ser.C:43:
    /usr/include/c++/3.3.4/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
    In file included from /usr/include/c++/3.3.4/vector:71,
                     from ../support/CmdLineArg.h:305,
                     from sniff_ser.C:43:
    /usr/include/c++/3.3.4/bits/stl_vector.h:200: error: template-id `
       reverse_iterator<__gnu_cxx::__normal_iterator<const _Tp*, 
       Support::std::vector<_Tp, _Alloc> > >' used as a declarator
    /usr/include/c++/3.3.4/bits/stl_vector.h:200: error: parse error before `;' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:201: error: template-id `
       reverse_iterator<__gnu_cxx::__normal_iterator<_Tp*, 
       Support::std::vector<_Tp, _Alloc> > >' used as a declarator
    /usr/include/c++/3.3.4/bits/stl_vector.h:201: error: parse error before `;' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:394: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:402: error: ISO C++ forbids defining 
       types within return type
    /usr/include/c++/3.3.4/bits/stl_vector.h:402: error: syntax error before `(' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `int Support::std::rend()
       ':
    /usr/include/c++/3.3.4/bits/stl_vector.h:402: error: `begin' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:402: error: (Each undeclared 
       identifier is reported only once for each function it appears in.)
    /usr/include/c++/3.3.4/bits/stl_vector.h:402: error: use of class template `
       template<class _Iterator> class std::reverse_iterator' as expression
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:410: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:415: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:419: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:433: error: `size_type' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:433: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void resize(...)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:435: error: `__new_size' undeclared 
       (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:435: error: `size' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:436: error: `begin' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:436: error: `end' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:436: error: `erase' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:438: error: `__x' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:438: error: `insert' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:452: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void resize(...)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:452: error: redefinition of `void 
       resize(...)'
    /usr/include/c++/3.3.4/bits/stl_vector.h:434: error: `void resize(...)' 
       previously defined here
    /usr/include/c++/3.3.4/bits/stl_vector.h:452: error: redefinition of `void 
       resize(...)'
    /usr/include/c++/3.3.4/bits/stl_vector.h:434: error: `void resize(...)' 
       previously defined here
    /usr/include/c++/3.3.4/bits/stl_vector.h:452: error: `value_type' undeclared 
       (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:459: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:467: error: non-member function `bool 
       empty()' cannot have `const' method qualifier
    /usr/include/c++/3.3.4/bits/stl_vector.h:487: error: `size_type' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:487: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:501: error: syntax error before `
       operator'
    /usr/include/c++/3.3.4/bits/stl_vector.h:515: error: syntax error before `
       operator'
    /usr/include/c++/3.3.4/bits/stl_vector.h:553: error: `size_type' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:553: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:560: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:567: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:574: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:581: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:595: error: parse error before `&' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void push_back(...)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:597: error: `_M_finish' undeclared 
       (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:597: error: `_M_end_of_storage' 
       undeclared (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:599: error: `_Construct' undeclared 
       (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:603: error: `_M_insert_aux' undeclared 
       (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void pop_back()':
    /usr/include/c++/3.3.4/bits/stl_vector.h:618: error: `_Destroy' undeclared 
       (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:633: error: `iterator' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:633: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:670: error: `iterator' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:670: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void insert(...)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:671: error: `void insert(...)' used 
       prior to declaration
    /usr/include/c++/3.3.4/bits/stl_vector.h:671: error: `__pos' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:671: error: `__n' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h:671: error: `_M_fill_insert' 
       undeclared (first use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:689: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:712: error: `iterator' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:712: error: parse error before `)' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:733: error: `iterator' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:733: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:745: error: `vector' was not declared 
       in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:746: error: variable or field `swap' 
       declared void
    /usr/include/c++/3.3.4/bits/stl_vector.h:746: error: syntax error before `{' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:748: error: `int std::swap' redeclared 
       as different kind of symbol
    /usr/include/c++/3.3.4/bits/stl_list.h:1162: error: previous declaration of `
       template<class _Tp, class _Alloc> void std::swap(std::list<_Tp, _Alloc>&, 
       std::list<_Tp, _Alloc>&)'
    /usr/include/c++/3.3.4/bits/stl_vector.h:748: error: initializer list being 
       treated as compound expression
    /usr/include/c++/3.3.4/bits/stl_vector.h:749: error: `int std::swap' redeclared 
       as different kind of symbol
    /usr/include/c++/3.3.4/bits/stl_list.h:1162: error: previous declaration of `
       template<class _Tp, class _Alloc> void std::swap(std::list<_Tp, _Alloc>&, 
       std::list<_Tp, _Alloc>&)'
    /usr/include/c++/3.3.4/bits/stl_vector.h:749: error: initializer list being 
       treated as compound expression
    /usr/include/c++/3.3.4/bits/stl_vector.h:750: error: parse error before `}' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void clear()':
    /usr/include/c++/3.3.4/bits/stl_vector.h:759: error: `erase' undeclared (first 
       use this function)
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:761: error: parse error before `
       protected'
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void 
       _M_initialize_dispatch(_InputIter, _InputIter, __false_type)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:805: error: parse error before `<' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:814: error: type specifier omitted for 
       parameter `input_iterator_tag'
    /usr/include/c++/3.3.4/bits/stl_vector.h:824: error: type specifier omitted for 
       parameter `forward_iterator_tag'
    /usr/include/c++/3.3.4/bits/stl_vector.h:825: error: redefinition of `
       template<class _ForwardIterator> void _M_range_initialize(_ForwardIterator, 
       _ForwardIterator)'
    /usr/include/c++/3.3.4/bits/stl_vector.h:815: error: `template<class 
       _InputIterator> void _M_range_initialize(_InputIterator, _InputIterator)' 
       previously declared here
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void 
       _M_range_initialize(_ForwardIterator, _ForwardIterator)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:826: error: parse error before `=' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void 
       _M_assign_dispatch(_Integer, _Integer, __true_type)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:841: error: parse error before `>' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void 
       _M_assign_dispatch(_InputIter, _InputIter, __false_type)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:850: error: parse error before `<' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:859: error: type specifier omitted for 
       parameter `input_iterator_tag'
    /usr/include/c++/3.3.4/bits/stl_vector.h:865: error: type specifier omitted for 
       parameter `forward_iterator_tag'
    /usr/include/c++/3.3.4/bits/stl_vector.h:870: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:878: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void 
       _M_insert_dispatch(...)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:881: error: parse error before `>' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:888: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:890: error: redefinition of `
       template<class _InputIterator> void _M_insert_dispatch(...)'
    /usr/include/c++/3.3.4/bits/stl_vector.h:880: error: `template<class _Integer> 
       void _M_insert_dispatch(...)' previously declared here
    /usr/include/c++/3.3.4/bits/stl_vector.h: In function `void 
       _M_insert_dispatch(...)':
    /usr/include/c++/3.3.4/bits/stl_vector.h:891: error: parse error before `<' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h: At global scope:
    /usr/include/c++/3.3.4/bits/stl_vector.h:899: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:905: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:911: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:911: error: `void _M_fill_insert(...)' 
       used prior to declaration
    /usr/include/c++/3.3.4/bits/stl_vector.h:915: error: `iterator' was not 
       declared in this scope
    /usr/include/c++/3.3.4/bits/stl_vector.h:915: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:915: error: `void _M_insert_aux(...)' 
       used prior to declaration
    /usr/include/c++/3.3.4/bits/stl_vector.h:936: error: parse error before `&' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:937: error: `bool operator==(...)' 
       must have an argument of class or enumerated type
    /usr/include/c++/3.3.4/bits/stl_vector.h:937: error: `bool operator==(...)' 
       must take exactly two arguments
    /usr/include/c++/3.3.4/bits/stl_vector.h:955: error: parse error before `&' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:956: error: `bool operator<(...)' must 
       have an argument of class or enumerated type
    /usr/include/c++/3.3.4/bits/stl_vector.h:956: error: `bool operator<(...)' must 
       take exactly two arguments
    /usr/include/c++/3.3.4/bits/stl_vector.h:964: error: parse error before `&' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:965: error: `bool operator!=(...)' 
       must have an argument of class or enumerated type
    /usr/include/c++/3.3.4/bits/stl_vector.h:965: error: `bool operator!=(...)' 
       must take exactly two arguments
    /usr/include/c++/3.3.4/bits/stl_vector.h:970: error: parse error before `&' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:971: error: `bool operator>(...)' must 
       have an argument of class or enumerated type
    /usr/include/c++/3.3.4/bits/stl_vector.h:971: error: `bool operator>(...)' must 
       take exactly two arguments
    /usr/include/c++/3.3.4/bits/stl_vector.h:976: error: parse error before `&' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:977: error: `bool operator<=(...)' 
       must have an argument of class or enumerated type
    /usr/include/c++/3.3.4/bits/stl_vector.h:977: error: `bool operator<=(...)' 
       must take exactly two arguments
    /usr/include/c++/3.3.4/bits/stl_vector.h:982: error: parse error before `&' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:983: error: `bool operator>=(...)' 
       must have an argument of class or enumerated type
    /usr/include/c++/3.3.4/bits/stl_vector.h:983: error: `bool operator>=(...)' 
       must take exactly two arguments
    /usr/include/c++/3.3.4/bits/stl_vector.h:988: error: parse error before `,' 
       token
    /usr/include/c++/3.3.4/bits/stl_vector.h:989: error: `template<class _Tp, class 
       _Alloc> void swap(...)' redeclared as different kind of symbol
    /usr/include/c++/3.3.4/bits/stl_vector.h:749: error: previous declaration of `
       int std::swap'
    /usr/include/c++/3.3.4/bits/stl_vector.h:749: error: previous non-function 
       declaration `int std::swap'
    /usr/include/c++/3.3.4/bits/stl_vector.h:989: error: conflicts with function 
       declaration `template<class _Tp, class _Alloc> void swap(...)'
    /usr/include/c++/3.3.4/bits/stl_vector.h:990: error: parse error before `}' 
       token
    In file included from /usr/include/c++/3.3.4/vector:72,
                     from ../support/CmdLineArg.h:305,
                     from sniff_ser.C:43:
    /usr/include/c++/3.3.4/bits/stl_bvector.h:345: error: `vector' is not a 
       template
    /usr/include/c++/3.3.4/bits/stl_bvector.h:348: confused by earlier errors, bailing out
    make[2]: *** [sniff_ser.o] Error 1
    make[2]: Leaving directory `/home/mohr/garmin/karmin-0.0.0pre10/src/sniff_ser'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/mohr/garmin/karmin-0.0.0pre10/src'
    make: *** [all] Error 2

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    http://sourceforge.net/projects/karmin
    Then ask your question in their forum.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. all about cross compilation
    By munna_dude in forum Linux Programming
    Replies: 1
    Last Post: 08-27-2008, 04:15 AM
  2. Compilation units
    By filler_bunny in forum C++ Programming
    Replies: 0
    Last Post: 10-21-2003, 03:57 AM
  3. MS VC++ Crash on compilation
    By Magos in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 08-23-2003, 07:06 PM
  4. hexdump issues
    By daluu in forum C Programming
    Replies: 2
    Last Post: 03-04-2003, 09:01 PM
  5. My compilation tape fun!
    By Brian in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-07-2002, 08:40 PM