Oh what a disaster. Now I found the reason for the compile errors by using fstream( ).
I wondered why it makes no difference if I #include<fstream> or not. The reason is
that the basic_fstream class is commented out by preprocessor define _MSL_NO_FILE_IO
in the include file <fstream>.
So the compiler sees just the following forward declaration.....
// fstream is just forwarded to basic_fstream in file "iosfwd"
template <class charT, class traits = char_traits<charT> >
class basic_fstream;
typedef basic_fstream<char, char_traits<char> > fstream;
.....but the implementation of class basic_fstream is missing.
So I thought no problem...comment out #define _MSL_NO_FILE_IO an it works.
No way, when I comment it out I got other compile error in Metrowerks MSL library:
----------------------
Error : undefined identifier 'fclose'
(point of instantiation: 'readFile()')
(instantiating: 'Metrowerks::c_filebuf<char, std::char_traits<char>>::~c_filebuf()')
(instantiating: 'Metrowerks::c_filebuf<char, std::char_traits<char>>::close()')
msl_c_filebuf line 323 if (_CSTD::fclose(file_) != 0)
(corresponding point of instantiation for 'Metrowerks::c_filebuf<char, std::char_traits<char>>::close()')
msl_c_filebuf line 141 }
(corresponding point of instantiation for 'Metrowerks::c_filebuf<char, std::char_traits<char>>::~c_filebuf()')
test.cpp line 30 }
----------------------
Either the fstream support does not work when using MSL with E68k, or I have to activate/deactivate other precompiler seeting here. Has any body of you experience with this kind of problem.
Thanks in Advance
Marc
P.S. Info from MSL C++ Manual:
_MSL_NO_FILE_IO: This flag allows you to turn off file support while keeping memory mapped streams (stringstream) functional.