Robert wrote:

> Truth is I havn't gotten to it.  Sorry.  Its a very tricky area.  One thing

> you might want to look at is the test which shows separate compilation.

> This avoids having the "same" code in both the executable and the dll which

> might help.

>

> Robert Ramey

 

 

Hi Robert,

 

Maybe you’ve missed my previous reply, see @ Thu, 2 Feb 2006. So I re-post it

 

Thanks to handle my request; I’ve looked the source directory “test” and “examples” of boost::serialization ver#1.33.1 and I didn’t find the test that you’ve pointed in your reply.

 

What’s the name of the test demonstrating separate compilation?

Do you have tested my source code sends with my previous post?

 

Marc Viala

mailto:mviala@acticm.com

 

   _____ 

 

#include <LibA/A.h>

#include <LibB/B.h>

 

#include <boost/filesystem/path.hpp>

#include <boost/filesystem/fstream.hpp>

 

#pragma comment(lib, "liba_d.lib")

#pragma comment(lib, "libb_d.lib")

 

int

main(int argc, char* argv[])

{

  libA::A a;

  libA::save(&a, boost::filesystem::ofstream("a.xml"));

 

  libB::B b;

  libB::save(&b, boost::filesystem::ofstream("b.xml")); // -> Assert in debug mode

 

  return 0;

}

----------------------

 

The figure hereafter describes the relationships between LibA, LibB and EXE application:

                      ------------                              ------------

                      |       LibA      |                              |       LibB       |

                      ------------                               ------------

                                             \                          /

                                               \                       /                                                      

                                                  Exe Application

 

We have to face to an assert in debug mode generate by the file boost::serialization::extended_type_info.cpp, line#71. This assert happens during the instance serialization of class libB:B.

 

Recently, there are some posts on this subject, but I would like to known how I can deal with this assert? Is it possible to avoid it by a code organisation? Is it possible to comment this assert?

 

To have a concrete answer, I have joined my complete VC++7.1 project.

 

Thanks in advance for your help.

 

Development Platform

WindowsXP

VC++ 7.1

Boost 1.33.1