Boost logo

Boost Users :

From: Jochen Hammann (jochen.hammann_at_[hidden])
Date: 2004-12-09 08:00:29


Hello,

I tried to build the regex library from Boost 1.32.0 with the Microsoft
Visual C++ 7.1 compiler and without native wchar_t support. Below is the
call to bjam:

bjam -sTOOLS=vc-7_1 "-sBUILD=<native-wchar_t>off" --with-regex

The build results of the dynamic link library (DLL) shows the following linker
errors:

    Creating library bin\boost\libs\regex\build\boost_regex.dll\vc-7_1\debug\native-wchar_t-off\threading-multi\boost_regex-vc71-mt-gd-1_32.lib and object
bin\boost\libs\regex\build\boost_regex.dll\vc-7_1\debug\native-wchar_t-off\threading-multi\boost_regex-vc71-mt-gd-1_32.exp
instances.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
winstances.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
regex.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
regex_debug.obj : error LNK2019: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z) referenced in function "void __cdecl regex_lib_print_compiler_macros(void)" (?regex_lib_print_compiler_macros@@YAXXZ)
w32_regex_traits.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
wide_posix_api.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
c_regex_traits.obj : error LNK2019: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z) referenced in function "public: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::syntax_type(unsigned int)const "
(?syntax_type@?$cpp_regex_traits@_W_at_boost@@QBAII_at_Z)
c_regex_traits_common.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
cregex.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
posix_api.obj : error LNK2001: unresolved external symbol "private: unsigned int __cdecl boost::cpp_regex_traits<wchar_t>::do_syntax_type(unsigned int)const "
(?do_syntax_type@?$cpp_regex_traits@_W_at_boost@@ABAII_at_Z)
bin\boost\libs\regex\build\boost_regex.dll\vc-7_1\debug\native-wchar_t-off\threading-multi\boost_regex-vc71-mt-gd-1_32.dll : fatal error LNK1120: 1 unresolved externals
...failed vc-Link bin\boost\libs\regex\build\boost_regex.dll\vc-7_1\debug\native-wchar_t-off\threading-multi\boost_regex-vc71-mt-gd-1_32.dll
bin\boost\libs\regex\build\boost_regex.dll\vc-7_1\debug\native-wchar_t-off\threading-multi\boost_regex-vc71-mt-gd-1_32.lib...
..skipped <@boost!lib>boost_regex-vc71-mt-gd-1_32.dll for lack of <@boost!libs!regex!build\boost_regex.dll\vc-7_1\debug\native-wchar_t-off\threading-multi>boost_regex-vc71-mt-gd-1_32.dll...
...skipped <@boost!lib>boost_regex-vc71-mt-gd-1_32.lib for lack of <@boost!libs!regex!build\boost_regex.dll\vc-7_1\debug\native-wchar_t-off\threading-multi>boost_regex-vc71-mt-gd-1_32.lib...

The build of the static library succeeds.

Do I have to define a special macro, if I want to build regex without
native wchar_t support?

Or do the regex library support both, native wchar_t support and the
mapping to unsigned short? In the header regex_traits.hpp I saw some
wrappers to "redirects calls to cpp_regex_traits<unsigned short> to
cpp_regex_traits<__wchar_t>".

Regards,

     Jochen.


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