error while compilation .help

K

kanalkannan

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::bookmark (Bool bSet)
127 {
128 static Bool bBookmarkOn = FALSE;
129 static streampos strmpos;
130 static UInt uNumOfBitsInBuffer;
131 static Char chDecBuffer;
132 static Int lCounter;
133
134 if(bSet) {
135 strmpos = m_pInStream -> tellg();
136 uNumOfBitsInBuffer = m_uNumOfBitsInBuffer;
137 chDecBuffer = m_chDecBuffer;
138 lCounter = m_lCounter;
139 bBookmarkOn = TRUE;
140 }
141 else {
142 m_pInStream -> seekg (strmpos);
143 m_uNumOfBitsInBuffer = uNumOfBitsInBuffer;
144 m_chDecBuffer = chDecBuffer;
145 m_lCounter = lCounter;
146 bBookmarkOn = FALSE;
147 }
148 }


Thanks in advance .
 
Z

Zeppe

kanalkannan said:
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
 
K

kanalkannan

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..
 
K

kanalkannan

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..
 
Z

Zeppe

kanalkannan said:
well,now the above error has gone..
but the following errors are still unresolvable..
bitstrm.hpp:17: error: forward declaration of 'struct istream'

it would suffy to apply the same error-removal strategy once again:
1) include <iostream>
2) use std::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..

you don't need to include ios in both of them. You may need to know a
little c++, however, in order to compile whatever program, otherwise we
can spend the day interacting for every error line you get from the
compiler.

Regards,

Zeppe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top