I'm using Windows XP with Visual Studio 2003. I've compiled boost 1.33.1
successfully with bjam and installed the libs and DLLs into my environment.
I started playing with the serialization library. I created a win32 console
project and copied in the demo.cpp serialization program. It compiles and
runs just fine.
I then started added serialization to my own project and started running
into problem after problem. I've since commented out all my own code except
for the following:
I copied the gps_position class directly from demo.cpp into my project. At
the top of the file, I've included the following files:
#include
#include
#include
#include
#include
In my class Manager, I wrote the following method:
void Manager::save(const std::string & filename)
{
boost::recursive_mutex::scoped_lock lock(_nodeMutex);
std::ofstream outFile;
outFile.open(filename.c_str(), std::ios::binary);
boost::archive::text_oarchive archiveFile(outFile);
// simple test
const gps_position g;
archiveFile << g;
outFile.close();
}
Trying to compile, I get the following errors:
..\API\inc\boost\archive\detail\oserializer.hpp(131) : error C2027: use of
undefined type 'boost::serialization::extended_type_info_null<T>'
with
[
T=gps_position
]
..\API\inc\boost\archive\detail\oserializer.hpp(131) : see reference
to class template instantiation
'boost::serialization::extended_type_info_null<T>' being compiled
with
[
T=gps_position
]
..\API\inc\boost\archive\detail\oserializer.hpp(128) : while
compiling class-template member function 'bool
boost::archive::detail::oserializer::is_polymorphic(void) const'
with
[
Archive=boost::archive::text_oarchive,
T=gps_position
]
..\API\inc\boost\archive\detail\oserializer.hpp(264) : see reference
to class template instantiation
'boost::archive::detail::oserializer' being compiled
with
[
Archive=boost::archive::text_oarchive,
T=gps_position
]
.
.
.
*snip*
As far as my project settings, I'm compiling a win32 DLL, with the
Multithread Debug C++ standard library DLL. I have exceptions and RTTI
enabled. Basically the same settings I used for compiling demo.cpp.
If I comment out the "archiveFile << g;" line, it compiles fine. Any help
would be greatly appreciated!
Thank you,
Scott