Boost logo

Boost :

From: Jared McIntyre (jmcintyre_at_[hidden])
Date: 2005-02-02 12:01:15

> Well, it doesn't look like you're inclined to give up so I guess we can't
> either.

Thas greatly appreciated.

> Do I take this to mean that almost all the tests (200+) compiled, linked,
> and executed with no error?

Correct. To be exact, there were 5 skipped and 5 that failed.

> General
> 1) Configuration Type: Application(.exe)
> 2) Use of MFC: Use Standard Windows Libraries
> 3) Use of ATL: Not using ATL

This project is MFC based, but I can't imagine that is causing an issue. Otherwise its the same.

> C/C++
> 1) General
> Additional Include Directories - the directory that contains boost
> headers
> 3) Preprocessor:
> Preprocessor definitions - WIN32;_DEBUG;_CONSOLE
> 4) Code Generation
> Enable C++ Exceptions - Yes(/EHsc)
> Runtime Library - Multi-threaded Debug DLL - note the DLL ! ( I
> suspect this is the problem)
> Enable Function-level Linking - Yes(/Gy) I prefer this myself but
> not strictly necessary
> 5) Language
> Enable Run-Time type info - Yes (/GR)
> Linker
> 1) General
> Additional Library Directories - <directory that contains the
> serialization library here>
> 2) Input
> Additional Dependencies - libboost_serialization.lib

This is all the same with the exception of the console part (since it is an MFC GUI app), but again, I doubt that is
causing it.

> I would hope that those settings should do it. To make sure its finding the
> correct libboost_serialization.lib - change the name of this file. It
> should come up with an error at link time - can't find file
> libbost_serialization.lib. Changing this name back should make this error go
> away.


> The program should now compile !?

Saddly, the problem persists. Perhaps it is something other than the library. Here are some code snippets in case
there are issues there.

The includes in the file that performes the save:

#include <fstream>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

Here is the save code:

std::ofstream ofs(PCSZ_USER_TOOLS_FILE, std::ios::binary);
boost::archive::text_oarchive oa(ofs);
// write class state from archive
oa << boost::serialization::make_nvp("UserToolList", m_UserTools);
// close archive

m_UserTools is an instance of a typedefed vector defined as:

typedef std::vector<BusUserTool*> USER_TOOL_LIST;

Thanks for hanging in with me. I will probably need to change the code so I compile the serialization code into the
project soon in order to meet my deadlines, but I'd like to get the library working if possible.


Boost list run by bdawes at, gregod at, cpdaniel at, john at