Boost logo

Boost Users :

From: Éò»Û·å (useradd_at_[hidden])
Date: 2005-08-19 05:13:31


The same configure(stlport compiled with /Zc:wchar_t, boost builded with
<native-wchar_t>on) works fine with boost 1.32. I hope this error can be
corrected, regex library is used so often in my code.

The building dynamic library of regex "libboost_regex-vc71-mt-p-1_33.lib"
can not be used correctly.

I compile the demo code grep.cpp
cl /MT /DBOOST_LIB_DIAGNOSTIC /EHsc grep.cpp (This compiling succeeds)
cl /MD /DBOOST_LIB_DIAGNOSTIC /EHsc grep.cp (This compiling fails)
The error is :
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: __thiscall
_STL::basic_string<unsigned short,class _STL::char_traits<unsigned
short>,class _STL::allocator<unsigned short> >::basic_string<unsigned
short,class _STL::char_traits<unsigned short>,class _STL::allocator<unsigned
short> >(unsigned short const *,class _STL::allocator<unsigned short> const
&)"
(__imp_??0?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@QAE_at_PBGABV?$allocator_at_G@1@@Z)
referenced in function "class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
__fastcall boost::re_detail::w32_cat_get(class boost::shared_ptr<void> const
&,unsigned long,int,class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
const &)"
(?w32_cat_get_at_re_detail_at_boost@@YI?AV?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@ABV?$shared_ptr_at_X@2_at_KHABV34@@Z)
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: __thiscall
_STL::basic_string<unsigned short,class _STL::char_traits<unsigned
short>,class _STL::allocator<unsigned short> >::basic_string<unsigned
short,class _STL::char_traits<unsigned short>,class _STL::allocator<unsigned
short> >(class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
const &)"
(__imp_??0?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@QAE_at_ABV01@@Z)
referenced in function "class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
__fastcall boost::re_detail::w32_cat_get(class boost::shared_ptr<void> const
&,unsigned long,int,class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
const &)"
(?w32_cat_get_at_re_detail_at_boost@@YI?AV?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@ABV?$shared_ptr_at_X@2_at_KHABV34@@Z)
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: void __thiscall
_STL::_String_base<unsigned short,class _STL::allocator<unsigned short>
>::_M_allocate_block(unsigned int)"
(__imp_?_M_allocate_block@?$_String_base_at_GV?$allocator_at_G@_STL@@@_STL@@QAEXI_at_Z)
referenced in function "private: void __thiscall _STL::basic_string<unsigned
short,class _STL::char_traits<unsigned short>,class _STL::allocator<unsigned
short> >::_M_range_initialize<unsigned short const *>(unsigned short const
*,unsigned short const *,struct _STL::forward_iterator_tag const &)"
(??$_M_range_initialize_at_PBG@?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@AAEXPBG0ABUforward_iterator_tag_at_1@@Z)
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: __thiscall
_STL::_String_base<unsigned short,class _STL::allocator<unsigned short>
>::~_String_base<unsigned short,class _STL::allocator<unsigned short>
>(void)" (__imp_??1?$_String_base_at_GV?$allocator_at_G@_STL@@@_STL@@QAE_at_XZ)
referenced in function $L41388
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: __thiscall
_STL::_String_base<unsigned short,class _STL::allocator<unsigned short>
>::_String_base<unsigned short,class _STL::allocator<unsigned short> >(class
_STL::allocator<unsigned short> const &)"
(__imp_??0?$_String_base_at_GV?$allocator_at_G@_STL@@@_STL@@QAE_at_ABV?$allocator_at_G@1@@Z)
referenced in function "public: __thiscall _STL::basic_string<unsigned
short,class _STL::char_traits<unsigned short>,class _STL::allocator<unsigned
short> >::basic_string<unsigned short,class _STL::char_traits<unsigned
short>,class _STL::allocator<unsigned short> ><unsigned short const
*>(unsigned short const *,unsigned short const *,class
_STL::allocator<unsigned short> const &)"
(??$?0PBG@?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@QAE_at_PBG0ABV?$allocator_at_G@1@@Z)
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: __thiscall
_STL::basic_string<unsigned short,class _STL::char_traits<unsigned
short>,class _STL::allocator<unsigned short> >::~basic_string<unsigned
short,class _STL::char_traits<unsigned short>,class _STL::allocator<unsigned
short> >(void)"
(__imp_??1?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@QAE_at_XZ)
referenced in function "class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
__fastcall boost::re_detail::w32_transform(unsigned long,unsigned short
const *,unsigned short const *)"
(?w32_transform_at_re_detail_at_boost@@YI?AV?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@KPBG0_at_Z)
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: class
_STL::basic_string<unsigned short,class _STL::char_traits<unsigned
short>,class _STL::allocator<unsigned short> > & __thiscall
_STL::basic_string<unsigned short,class _STL::char_traits<unsigned
short>,class _STL::allocator<unsigned short> >::append(unsigned int,unsigned
short)"
(__imp_?append@?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@QAEAAV12_at_IG@Z)
referenced in function "class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
__fastcall boost::re_detail::w32_transform(unsigned long,unsigned short
const *,unsigned short const *)"
(?w32_transform_at_re_detail_at_boost@@YI?AV?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@KPBG0_at_Z)
libboost_regex-vc71-mt-p-1_33.lib(w32_regex_traits.obj) : error LNK2019:
unresolved external symbol "__declspec(dllimport) public: __thiscall
_STL::basic_string<unsigned short,class _STL::char_traits<unsigned
short>,class _STL::allocator<unsigned short> >::basic_string<unsigned
short,class _STL::char_traits<unsigned short>,class _STL::allocator<unsigned
short> >(void)"
(__imp_??0?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@QAE_at_XZ)
referenced in function "class _STL::basic_string<unsigned short,class
_STL::char_traits<unsigned short>,class _STL::allocator<unsigned short> >
__fastcall boost::re_detail::w32_transform(unsigned long,unsigned short
const *,unsigned short const *)"
(?w32_transform_at_re_detail_at_boost@@YI?AV?$basic_string_at_GV?$char_traits_at_G@_STL@@V?$allocator_at_G@2@@_STL@@KPBG0_at_Z)

----- Original Message -----
From: "John Maddock" <john_at_[hidden]>
To: <boost-users_at_[hidden]>
Sent: Friday, August 19, 2005 12:23 AM
Subject: Re: [Boost-users] Build the dll version of regex
failswithvc-7_1-stlport

>> Since the stl library of vc7.1 has some bugs and insufficiency. I use
>> stlport libray all the times. I compile regex library with stlport 4.62
>> and
>> 5.0RC4, with or without the ICU. The dll all can not be compiled
>> successfully! (In below I only describe the compile process with ICU.)
>>
>> First I try the stlport 4.62 with VC7.1 to build the library of regex,
>> the
>> script I use is(the icu is also compiled with the same stlport) :
>> call "c:\Program Files\Microsoft Visual Studio .NET
>> 2003\Vc7\bin\vcvars32.bat"
>> set TOOLS=vc-7_1-stlport
>> set STLPORT_PATH=c:\opt
>> set STLPORT_4.62_PATH=C:\opt\STLport-4.6.2
>> set STLPORT_VERSION=4.6.2
>> set ICU_PATH=c:\opt\icu
>> bjam "-sBUILD=debug release <runtime-link>dynamic <threading>multi
>> <native-wchar_t>on" "-sICU_PATH=c:\opt\icu" --with-regex stage
>>
>> But the dll files can not be compiled successfully. The error occurs when
>> linking(Attentions the exp and pdb files exists).
>
> All the errors seem to relate to wide-character functions, I believe if
> you
> omit the <native-wchar_t>on flag then it should build (it does for me).
> Or
> did you build STLport with /Zc:wchar_t ? If so it's possible we disabled
> support for <native-wchar_t>on in the Jamfile given that STLport doesn't
> normally support that.
>
>> But I find in stlport 5.0 the rule of library and dll file is changed.
>> The
>> files are : stlport_d50.dll, stlport_r50.dll, stlport_stld50.dll,
>> stlport_d50.lib, stlport_r50.lib, stlport_stld50.lib,
>> stlport_static_d50.lib, stlport_static_r50.lib, stlport_static_stld50.lib
>>
>> I also try copy stlport_d50.lib and stlport_r50.lib as
>> stlport_vc71_stldebug.lib and stlport_vc71.lib, and the link is
>> completed.
>> So I am very surprise which tell the regex to link with
>> stlport_vc71_stldebug.lib and stlport_vc71.lib, I think it may be the
>> boost
>> or bjam, not stlport. Since the stlport 5.0 will be released soon. I
>> think
>> it is a big bug.
>
> Not that big, I guess no-one has been testing with STLport 5 Beta, I'm
> sure
> bjam will support it once it's released.
>
> John.
>
>

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

> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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