|
Boost : |
From: Daniel Schlyder (daniel_at_[hidden])
Date: 2004-12-20 05:09:54
Hi,
I get the following error when trying to compile a simple test (attached)
using vector_sink from the tutorial with MinGW GCC 3.4.2:
boost_iostreams.cpp: In function `int main()':
boost_iostreams.cpp:41: error: invalid operands of types
`boost::io::streambuf_facade<
vector_sink, char_traits<char>, boost::io::output
> ()(vector_sink)' and `int' to binary `operator<<'
Please accept my apologies if I've overlooked something crucial in the docs.
In case it matters, here is a list of changes I made to make the lib compile
cleanly:
1.
E:\libs\boost\libs\iostreams\build\../src/mapped_file.cpp:168: error:
`::GetFileSizeEx' has not been declared
According to MSDN, GetFileSizeEx() is only available under Windows 2000 and
newer, so I had to remove this file from Jamfile sources. Maybe there should
be a define for this, like for the compression code.
2.
E:/libs/boost/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:150:
error: `default_filter_buffer_size' undeclared (first use this function)
E:/libs/boost/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:151:
error: `default_buffer_size' undeclared (first use this function)
E:/libs/boost/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:155:
error: `default_pback_buffer_size' undeclared (first use this function)
Fixed by including 'boost/iostreams/constants.hpp'.
3.
E:/libs/boost/boost/iostreams/categories.hpp:102: warning: virtual base
`boost::io::input_seekable' inaccessible in `boost::io::iostream_tag' due
to ambiguity
E:/libs/boost/boost/iostreams/categories.hpp:102: warning: virtual base
`boost::io::device_tag' inaccessible in `boost::io::iostream_tag' due to
ambiguity
E:/libs/boost/boost/iostreams/categories.hpp:102: warning: virtual base
`boost::io::output_seekable' inaccessible in `boost::io::iostream_tag' due
to ambiguity
Fixed by replacing
struct seekable_device_tag : device_tag, seekable { };
with
struct seekable_device_tag : virtual device_tag, seekable { };
and
struct seekable : input_seekable, output_seekable, detail::one_head { };
with
struct seekable : virtual input_seekable, virtual output_seekable, detail::one_head { };
4.
E:/libs/boost/boost/iostreams/detail/streambuf/linked_streambuf.hpp:54: error:
variable or field `close' declared void
E:/libs/boost/boost/iostreams/detail/streambuf/linked_streambuf.hpp:54: error:
`close' declared as a `virtual' field
E:/libs/boost/boost/iostreams/detail/streambuf/linked_streambuf.hpp:54: error:
expected `;' before '(
' token
Fixed by including 'ios'.
5.
E:/libs/boost/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:377:1:
warning: multi-line comment
Fixed by changing to C-style comment. Not sure whether this is a problem with
the code or GCC not handling the '\' in the macro definition properly.
I also removed duplicate include of 'boost/iostreams/constants.hpp' in
'boost/iostreams/stream_facade.hpp'.
TIA,
-- Daniel Schlyder http://bitblaze.com/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk