error while compilation .help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kanalkannan

    #1

    error while compilation .help

    hi friends

    I compiled mpeg application and got some errors on that..
    I used bfin-elf-g++ cross compiler
    Error:

    bitstrm.cpp:129 : error: 'streampos' does not name a type
    bitstrm.cpp:135 : error: 'strmpos' was not declared in this scope
    bitstrm.cpp:135 : error: invalid use of undefined type 'struct
    istream'
    bitstrm.hpp:17: error: forward declaration of 'struct istream'
    bitstrm.cpp:142 : error: invalid use of undefined type 'struct
    istream'
    bitstrm.hpp:17: error: forward declaration of 'struct istream'
    bitstrm.cpp:142 : error: 'strmpos' was not declared in this scope

    code:

    Void CInBitStream::b ookmark (Bool bSet)
    127 {
    128 static Bool bBookmarkOn = FALSE;
    129 static streampos strmpos;
    130 static UInt uNumOfBitsInBuf fer;
    131 static Char chDecBuffer;
    132 static Int lCounter;
    133
    134 if(bSet) {
    135 strmpos = m_pInStream -tellg();
    136 uNumOfBitsInBuf fer = m_uNumOfBitsInB uffer;
    137 chDecBuffer = m_chDecBuffer;
    138 lCounter = m_lCounter;
    139 bBookmarkOn = TRUE;
    140 }
    141 else {
    142 m_pInStream -seekg (strmpos);
    143 m_uNumOfBitsInB uffer = uNumOfBitsInBuf fer;
    144 m_chDecBuffer = chDecBuffer;
    145 m_lCounter = lCounter;
    146 bBookmarkOn = FALSE;
    147 }
    148 }


    Thanks in advance .












  • Zeppe

    #2
    Re: error while compilation .help

    kanalkannan wrote:
    hi friends
    >
    I compiled mpeg application and got some errors on that..
    I used bfin-elf-g++ cross compiler
    Error:
    >
    bitstrm.cpp:129 : error: 'streampos' does not name a type
    1) include <ios>
    2) use std::streampos

    Regards,

    Zeppe

    Comment

    • kanalkannan

      #3
      Re: error while compilation .help

      On Nov 26, 2:33 pm, Zeppe
      <ze...@remove.a ll.this.long.co mment.yahoo.itw rote:
      kanalkannan wrote:
      hi friends
      >
      I compiled mpeg application and got some errors on that..
      I used bfin-elf-g++ cross compiler
      Error:
      >
      bitstrm.cpp:129 : error: 'streampos' does not name a type
      >
      1) include <ios>
      2) use std::streampos
      >
      Regards,
      >
      Zeppe

      well,now the above error has gone..
      but the following errors are still unresolvable..
      bitstrm.hpp:17: error: forward declaration of 'struct istream'
      bitstrm.cpp:142 : error: invalid use of undefined type 'struct

      code:::
      bitstream.cpp
      -------------
      77: m_chDecBuffer = m_pInStream -get ();

      bitstream.hpp
      -------------
      17: class istream;

      note::i also included the ios both in cpp and hpp files..
      i got the similar type of errors throughout more parts of the code..
      please help me to fix this..

      Comment

      • kanalkannan

        #4
        Re: error while compilation .help

        On Nov 26, 2:33 pm, Zeppe
        <ze...@remove.a ll.this.long.co mment.yahoo.itw rote:
        kanalkannan wrote:
        hi friends
        >
        I compiled mpeg application and got some errors on that..
        I used bfin-elf-g++ cross compiler
        Error:
        >
        bitstrm.cpp:129 : error: 'streampos' does not name a type
        >
        1) include <ios>
        2) use std::streampos
        >
        Regards,
        >
        Zeppe

        well,now the above error has gone..
        but the following errors are still unresolvable..
        bitstrm.hpp:17: error: forward declaration of 'struct istream'
        bitstrm.cpp:142 : error: invalid use of undefined type 'struct

        code:::
        bitstream.cpp
        -------------
        142: m_chDecBuffer = m_pInStream -get ();

        bitstream.hpp
        -------------
        17: class istream;

        note::i also included the ios both in cpp and hpp files..
        i got the similar type of errors throughout more parts of the code..
        please help me to fix this..

        Comment

        Working...