boost::serialize on Codewarrior 8.3 (Mac)

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all, I would like to use boost::serialize for one of my projects, using Codewarrior 8.3 (going to CW 9 may or may not be in the picture), on Mac OS X (10.3.x) Anyway, I've been working on getting the unit tests for boost::serialize up and running inside the Codewarrior IDE. I created a new project file (C++, Mac OS Carbon, Console), included a serialize unit test, set the paths correctly, included the files I thought I would need for boost::test stuff, all that jazz. The test that I'm trying out now, in the serialization test suite, is test_binary.cpp. Trying to compile it gave me some immediate compiler errors (which I fixed by #including some additional source files: "binary_archive.hpp", "stdio.h" (tmpnam is in stdio.h in CW, and not cstdio). At the end I have just one error which I don't understand (both because the error message is hard to parse, and I'm fairly new to the boost libraries in general). Here, for completeness, is the error message: Error : illegal use of abstract class ('boost::archive::detail::basic_iserializer::load_object_data(boost::archive::detail::basic_iarchive &, void *, const unsigned int) const') ~ (point of instantiation: 'test_main(int, char **)') ~ (instantiating: 'boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive>::operator>><boost::serialization::nvp<A>>(const boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>::load_override<boost::serialization::nvp<A>>(boost::serialization::nvp<A> &, int)') ~ (instantiating: 'boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>::load_override<boost::serialization::nvp<A>>(boost::serialization::nvp<A> &, int)') ~ (instantiating: 'boost::archive::load<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive, boost::serialization::nvp<A>>::invoke(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive, boost::serialization::nvp<A>>::load_only::invoke(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::serialization::serialize_adl<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::serialize<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::access::serialize<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::nvp<A>::serialize<boost::archive::binary_iarchive>(boost::archive::binary_iarchive &, const unsigned int) const') ~ (instantiating: 'boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive>::operator&<A>(A &)') ~ (instantiating: 'boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>::load_override<A>(A &, int)') ~ (instantiating: 'boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>::load_override<A>(A &, int)') ~ (instantiating: 'boost::archive::load<boost::archive::binary_iarchive, A>(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive, A>::invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchive, A>::load::invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::iserializer<boost::archive::binary_iarchive, A>::instantiate()') iserializer.hpp line 142 static iserializer instance; _____ I don't, really, understand why there's an error here, as iserializer is ~ a non-abstract type (as far as I can see), but it looks like there's plenty of template stuff going on, and there may be a clue in there. Does anyone have any pointers, or ideas on how I can fix this error? Thanks, _Ryan Wilcox ================================================================ Wilcox Development Solutions: http://www.wilcoxd.com Toolsmiths for the Internet Age PGP: 0x2F4E9C31 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBx1BUbYO0qC9OnDERAtAcAJ4nR0Zff4hFRNQJzyVybmIO1DF7IwCff2LK 1KAnmA4JtS6AOvLgrJxVkF4= =/7gM -----END PGP SIGNATURE-----

--- At Mon, 20 Dec 2004 17:21:11 -0500, Ryan Wilcox wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello all,
I would like to use boost::serialize for one of my projects, using Codewarrior 8.3 (going to CW 9 may or may not be in the picture), on Mac OS X (10.3.x)
Anyway, I've been working on getting the unit tests for boost::serialize up and running inside the Codewarrior IDE. I created a new project file (C++, Mac OS Carbon, Console), included a serialize unit test, set the paths correctly, included the files I thought I would need for boost::test stuff, all that jazz.
The test that I'm trying out now, in the serialization test suite, is test_binary.cpp. Trying to compile it gave me some immediate compiler errors (which I fixed by #including some additional source files: "binary_archive.hpp", "stdio.h" (tmpnam is in stdio.h in CW, and not cstdio).
At the end I have just one error which I don't understand (both because the error message is hard to parse, and I'm fairly new to the boost libraries in general).
Here, for completeness, is the error message:
Error : illegal use of abstract class ('boost::archive::detail::basic_iserializer::load_object_data(boost: :archive::detail::basic_iarchive &, void *, const unsigned int) const') ~ (point of instantiation: 'test_main(int, char **)') ~ (instantiating: 'boost::archive::detail::interface_iarchive<boost::archive: :binary_iarchive>::operator>><boost::serialization::nvp<A>>(const boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>: :load_override<boost::serialization::nvp<A>>(boost::serialization::nvp<A> &, int)') ~ (instantiating: 'boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>: :load_override<boost::serialization::nvp<A>>(boost::serialization::nvp<A> &, int)') ~ (instantiating: 'boost::archive::load<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive: :binary_iarchive, boost::serialization::nvp<A>>::invoke(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive: :binary_iarchive, boost::serialization::nvp<A>>::load_only::invoke(boost::archive: :binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::serialization::serialize_adl<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::serialize<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::access::serialize<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::nvp<A>::serialize<boost::archive: :binary_iarchive>(boost::archive::binary_iarchive &, const unsigned int) const') ~ (instantiating: 'boost::archive::detail::interface_iarchive<boost::archive: :binary_iarchive>::operator&<A>(A &)') ~ (instantiating: 'boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>: :load_override<A>(A &, int)') ~ (instantiating: 'boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>: :load_override<A>(A &, int)') ~ (instantiating: 'boost::archive::load<boost::archive::binary_iarchive, A>(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive: :binary_iarchive, A>::invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive: :binary_iarchive, A>::load::invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::iserializer<boost::archive::binary_iarchive, A>::instantiate()') iserializer.hpp line 142 static iserializer instance;
_____
I don't, really, understand why there's an error here, as iserializer is ~ a non-abstract type (as far as I can see), but it looks like there's plenty of template stuff going on, and there may be a clue in there.
Does anyone have any pointers, or ideas on how I can fix this error?
I think you're looking at the wrong end of the stick: Error : illegal use of abstract class ('boost::archive::detail::basic_iserializer::load_object_data(boost: :archive::detail::basic_iarchive &, void *, const unsigned int) const') I think this says that load_object_data() is an illegal use of an abstract class. I haven't used the serialization library so I can't help much past trying to point in the right direction. ...Duane

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
--- At Mon, 20 Dec 2004 17:21:11 -0500, Ryan Wilcox wrote:
I would like to use boost::serialize for one of my projects, using Codewarrior 8.3 (going to CW 9 may or may not be in the picture), on Mac OS X (10.3.x)
I reproduced this error with the following Simplest Sample That Will (for me) Fail To Compile. <code> #include <fstream> #include <boost/archive/text_iarchive.hpp> #include <ios> #include <vector> int main() { std::ifstream in( "vectfname", (std::ios_base::openmode)0 ); boost::archive::text_iarchive dataSource(in); std::vector<int> is; dataSource >> boost::serialization::make_nvp("avector", is); } </code> Same message, "reproducible" 14 line example. Part of the error message (the beginning and the end) are still inline (although just a copy from the OP, it is 999.95% the same as what I get when I try to compile this sample. Notes: #1: text_iarchive and binary_iarchive both fail #2: text_oarchive and binary_oarchive both work. And again, I got these same errors with the samples/tests for serialize, (and the above sample is pretty braindead anyway)... Codewarrior project files available upon request. Are there any great thoughts on this from the gallery? Thanks so much, _Ryan Wilcox ================================================================ Wilcox Development Solutions: <http://www.wilcoxd.com> Toolsmiths for the Internet Age PGP: 0x2F4E9C31 [snip]
Error : illegal use of abstract class ('boost::archive::detail::basic_iserializer::load_object_data(boost: :archive::detail::basic_iarchive &, void *, const unsigned int) const') ~ (point of instantiation: 'test_main(int, char **)')
[snip]
: :load_override<A>(A &, int)') ~ (instantiating: 'boost::archive::load<boost::archive::binary_iarchive, A>(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive: :binary_iarchive, A>::invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::load_non_pointer_type<boost::archive: :binary_iarchive, A>::load::invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::iserializer<boost::archive::binary_iarchive, A>::instantiate()') iserializer.hpp line 142 static iserializer instance;
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFByOVVbYO0qC9OnDERAs6EAKCLwr7lmlKgyYsGsZYZyFxKzPvbHACgtfEc p1MjKBEkNA6y6gR7Tx/kZ+U= =2AJW -----END PGP SIGNATURE-----

what happens when you make the change below? Can you build and run any of the demos or tests? Please confirm that you have done this. Robert Ramey. Ryan Wilcox wrote:
I would like to use boost::serialize for one of my projects, using Codewarrior 8.3 (going to CW 9 may or may not be in the picture), on Mac OS X (10.3.x)
I reproduced this error with the following Simplest Sample That Will (for me) Fail To Compile.
<code>
#include <fstream>
// introduce this here: #include <boost/serialization/vector.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <ios> #include <vector>
int main() { std::ifstream in( "vectfname", (std::ios_base::openmode)0 ); boost::archive::text_iarchive dataSource(in); std::vector<int> is;
dataSource >> boost::serialization::make_nvp("avector", is); }
</code>

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/21/04, at 8:17 PM, Robert Ramey said:
what happens when you make the change below?
Same error.
Can you build and run any of the demos or tests?
While I did not try *all* of the demos/tests included, I tried: test_arry, test_vector, and test_binary: they all failed with this same error. (although, semi-obviously, the error output from test_array was much shorter) Yet More Information, _Ryan Wilcox ================================================================ Wilcox Development Solutions: <http://www.wilcoxd.com> Ph: (570) 662-0918 PGP: 0x2F4E9C31 55 North Main Street Apt 1 Mansfield PA 16933
Ryan Wilcox wrote:
I would like to use boost::serialize for one of my projects, using Codewarrior 8.3 [snip] <code>
#include <fstream>
// introduce this here: #include <boost/serialization/vector.hpp>
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFByZ2GbYO0qC9OnDERAptTAJ0T3Ra5JY6AiVHGv4WJPKd2FjViMQCgwLlp tCCV3uIt9xCVJU1VuwhjuVE= =Ul2s -----END PGP SIGNATURE-----

Are you buiding with bjam or with some other system. Here are the results we get when we use bjam. http://www.meta-comm.com/engineering/boost-regression/developer/serializatio n.html Most tests pass, a number of test fail - these are related to the serialization of derived pointers. This is a pending issue. Robert Ramey Ryan Wilcox wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello all,
I would like to use boost::serialize for one of my projects, using Codewarrior 8.3 (going to CW 9 may or may not be in the picture), on Mac OS X (10.3.x)
Anyway, I've been working on getting the unit tests for boost::serialize up and running inside the Codewarrior IDE. I created a new project file (C++, Mac OS Carbon, Console), included a serialize unit test, set the paths correctly, included the files I thought I would need for boost::test stuff, all that jazz.
The test that I'm trying out now, in the serialization test suite, is test_binary.cpp. Trying to compile it gave me some immediate compiler errors (which I fixed by #including some additional source files: "binary_archive.hpp", "stdio.h" (tmpnam is in stdio.h in CW, and not cstdio).
At the end I have just one error which I don't understand (both because the error message is hard to parse, and I'm fairly new to the boost libraries in general).
Here, for completeness, is the error message:
Error : illegal use of abstract class
('boost::archive::detail::basic_iserializer::load_object_data(boost::archive ::detail::basic_iarchive
&, void *, const unsigned int) const') ~ (point of instantiation: 'test_main(int, char **)') ~ (instantiating:
'boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive> ::operator>><boost::serialization::nvp<A>>(const
boost::serialization::nvp<A> &)') ~ (instantiating:
'boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>::load _override<boost::serialization::nvp<A>>(boost::serialization::nvp<A>
&, int)') ~ (instantiating:
'boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>::loa d_override<boost::serialization::nvp<A>>(boost::serialization::nvp<A>
&, int)') ~ (instantiating: 'boost::archive::load<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating:
'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchi ve,
boost::serialization::nvp<A>>::invoke(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &)') ~ (instantiating:
'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchi ve,
boost::serialization::nvp<A>>::load_only::invoke(boost::archive::binary_iarc hive
&, boost::serialization::nvp<A> &)') ~ (instantiating: 'boost::serialization::serialize_adl<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::serialize<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating: 'boost::serialization::access::serialize<boost::archive::binary_iarchive, boost::serialization::nvp<A>>(boost::archive::binary_iarchive &, boost::serialization::nvp<A> &, const unsigned int)') ~ (instantiating:
'boost::serialization::nvp<A>::serialize<boost::archive::binary_iarchive>(bo ost::archive::binary_iarchive
&, const unsigned int) const') ~ (instantiating:
'boost::archive::detail::interface_iarchive<boost::archive::binary_iarchive> ::operator&<A>(A
&)') ~ (instantiating:
'boost::archive::binary_iarchive_impl<boost::archive::binary_iarchive>::load _override<A>(A
&, int)') ~ (instantiating:
'boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>::loa d_override<A>(A
&, int)') ~ (instantiating: 'boost::archive::load<boost::archive::binary_iarchive,
(boost::archive::binary_iarchive &, A &)') ~ (instantiating:
'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchi ve,
invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating:
'boost::archive::detail::load_non_pointer_type<boost::archive::binary_iarchi ve,
load::invoke(boost::archive::binary_iarchive &, A &)') ~ (instantiating: 'boost::archive::detail::iserializer<boost::archive::binary_iarchive, instantiate()') iserializer.hpp line 142 static iserializer instance;
_____
I don't, really, understand why there's an error here, as iserializer is ~ a non-abstract type (as far as I can see), but it looks like there's plenty of template stuff going on, and there may be a clue in there.
Does anyone have any pointers, or ideas on how I can fix this error?
Thanks, _Ryan Wilcox
================================================================ Wilcox Development Solutions: http://www.wilcoxd.com Toolsmiths for the Internet Age PGP: 0x2F4E9C31 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBx1BUbYO0qC9OnDERAtAcAJ4nR0Zff4hFRNQJzyVybmIO1DF7IwCff2LK 1KAnmA4JtS6AOvLgrJxVkF4= =/7gM -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robert Ramey wrote: | Are you buiding with bjam or with some other system. Some other system. I'm sorry, I thought I made that implicitly known with my statement: | Anyway, I've been working on getting the unit tests for | boost::serialize up and running inside the Codewarrior IDE. I created | a new project file (C++, Mac OS Carbon, Console), included a | serialize unit test, set the paths correctly, included the files I | thought I would need for boost::test stuff, all that jazz. The key statements being "inside the Codewarrior IDE" (as I hear a fair bit of talk here (and/or in my googling) about the Codewarrior command line tools, but little about the IDE), and "created a new project file" ;-) Interesting questions though. _Ryan Wilcox ================================================================ Wilcox Development Solutions: http://www.wilcoxd.com Toolsmiths for the Internet Age PGP: 0x2F4E9C31 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBx688bYO0qC9OnDERAtvSAKCfq1eHTIzExPTjSwX84Skwkcf6TQCfU8iO Pu7L1c0OWEM2ku/ALXoJGW8= =RHYS -----END PGP SIGNATURE-----
participants (3)
-
Duane Murphy
-
Robert Ramey
-
Ryan Wilcox