Boost logo

Boost Users :

From: Wang Yun (a_hao_at_[hidden])
Date: 2004-12-10 11:49:44


goodmen wrote:

>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.
>
> 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.
> 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.
>
> Here are some questions about the serialization:
>1, Is the archive written by you ?
>2, Is the archive an independent lib?
>3, how can I solve the link problem?
>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 ?
>
> Here are my suggestions:
>1, Take the archive to be an independent lib.
>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 )
>
>
>note: I am a Chinese , and my english is poor . If some word above offends you or seems
> to be impolite , forgive me please ^_^
>
>
>
>        goodmen
>        goodmen_at_[hidden]
>          2004-12-09
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>
Hi, add these lines, will solve the link problem.

#if !defined(BOOST_WHATEVER_NO_LIB) && !defined(BOOST_WHATEVER_SOURCE)
# define BOOST_LIB_NAME boost_serialization
# ifdef BOOST_WHATEVER_DYN_LINK
# define BOOST_DYN_LINK
# endif
# define BOOST_LIB_DIAGNOSTIC
# include <boost/config/auto_link.hpp>
#endif

#ifdef _UNICODE
#if !defined(BOOST_WHATEVER_NO_LIB) && !defined(BOOST_WHATEVER_SOURCE)
# define BOOST_LIB_NAME boost_wserialization
# ifdef BOOST_WHATEVER_DYN_LINK
# define BOOST_DYN_LINK
# endif
# define BOOST_LIB_DIAGNOSTIC
# include <boost/config/auto_link.hpp>
#endif
#endif


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