Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-12-08 21:33:55


"goodmen" <goodmen_at_[hidden]> wrote in message
news:20041209014122.CB173372AA_at_smtp.263.net...
>Dear Robert Ramey ,
>Here is a new boost user ( but an 'old' c++ programmer ) writting to you.
>Now , with several painful night , my test code of serialization lib has't
run.

I'm sorry about that, we'll try to help.

>OK , as some letter in the list , I meet the link problem.
>The libs has been compiled and linked with bjam correctly,and the lib files
have
>been copied to the right position.But the compiler complained there are
some symbol
>not resolved.

Have you tried to build and run the test and or demo files?

>I have inspected the source code,and find the serialization use some file
in the
>[[archive]] dir. And in the docs, there are no any info about archive. It
seems that
>archive is not an independent lib(bjam not compile the archive files,but
copy the
>header file to the destination dir). Some classes in the archive are used
by Serialization,
>but the implementation of these classes are not processed by bjam,so these
class
>excite link errors(not compile errors!).

>Another feedback about your code is that There are not any C1204 compile
error in MSVC71
>if you build in the release mode. It seems that in debug mode, the compiler
add addition >info to the result binary and madee the scope of compiling
became to too large to the >compiler.

Unfortunately, this is a limitiation of the VC 7.1 compiler. I've addressed
this in another post. For now, lets leave this aside and make sure we can
get the small demos to build and run.

>Here are some questions about the serialization:
>1, Is the archive written by you ?
    Yes, with lots of feedback and criticism from other boosters.
>2, Is the archive an independent lib?
    There are two libraries generated libboost_serialization.lib and
libboost_wserialization.lib. The second is only required by applications
which use wide character i/o.
>3, how can I solve the link problem?
Carefully read the "Getting Started" section of the documents. Then try to
build and run the simplest demo demo.cpp. You can either use the bjam
system or use the vc7 ide and link to the appropriate *.lib files in your
stage directory. This latter method will require that the project
properties be set in accordance with the library being used. This will
require a careful reading of the "Getting Started" section of the boost
documentation.
4, It seems that there is not a single header file that can be included by
user who want
   to use the serialization(and the user can forget all other header
files ). Do you have
   any plan to add this feature ?
No. Most application modules only require a small subset of the header
files. It would be sub-optimal to require that all be included in every
code module.

> Here are my suggestions:
>1, Take the archive to be an independent lib.
This suggests a misunderstanding of the libraries generated and used.
Rephrase this question.
>2, Move the whole serialization code to the head file,so there is no need
to compile the
> lib with the bjam,and this can bring more protablity.( Since the io
stream interface
> of stl is standard, I think it is no need to compile code into platform
specific libs )
a) this is not possible and still implement all features of the library
(e.g. export)
b) even it were, it would result in much slower compile and link times and
much larger executables.

>I am a Chinese , and my english is poor . If some word above offends you or
seems to be >impolite , forgive me please ^_^

No problem - we never intentionally offend anyone on this forum.

I sympathize with your difficulties. We will try to help. I can tell you
that you will find the inconvenience of getting things working to be more
than compensated by the utility of the boost libraries.

Robert Ramey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net