$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Alexander Arhipenko (arhipjan_at_[hidden])
Date: 2008-04-08 03:43:16
On Mon, Apr 7, 2008 at 6:49 PM, Vladimir Prus <ghost_at_[hidden]> wrote:
>
> Alexander Arhipenko wrote:
>
> > Guys, we've got an issue while upgrading to release 1.35 of boost libraries.
> > Since boost::filesystem now depends on boost::system, following list of linker
> > errors appears ONLY on windows platform (VC9 compiler is used):
> >
> > source.obj : error LNK2019: unresolved external symbol
> > "__declspec(dllimport) class boost::system::error_category const & __cdecl
> > boost::system::get_system_category(void)"
> > (__imp_?get_system_category_at_system@boost@@YAABVerror_category_at_12@XZ)
> > referenced in function
> > "public: __thiscall boost::system::error_code::error_code(void)"
> > (??0error_code_at_system@boost@@QAE_at_XZ)
> > source.obj : error LNK2019: unresolved external symbol
> > "__declspec(dllimport) class boost::system::error_category const &
> > __cdecl boost::system::get_posix_category(void)"
> > (__imp_?get_posix_category_at_system@boost@@YAABVerror_category_at_12@XZ)
> > referenced in function
> > "void __cdecl boost::system::`dynamic initializer for 'posix_category''(void)"
> > (??__Eposix_category_at_system@boost@@YAXXZ)
> > ..\bin\bsys\msvc-8.0\debug\threading-multi\use_boost_filesystem.dll :
> > fatal error LNK1120: 2 unresolved externals
> >
> > In attach there is a minimal project (source.cpp + Jamfile) that
> > reproduces the problem and
> > a patch that fixes the problem.
> >
> > Thanks, waiting for your feedback
>
> Why are you adding <library>/boost/system only for shared link. It seems
> to be it should be added to build requirements unconditionally.
>
> - Volodya
>
Hi, Volodya!
This behavior only occurs on MS platform when linking
to boost.filesystem built as shared library
(I need to have a deeper look at the library to find out why).
That's why I hadn't added dependency when linking boost.filesystem
statically. But using unconditional build requirements also works fine.
Maybe it's better to ask library author to propose right solution.
Regards, Sasha