使用icu 64.2构建Boost 1.70.0

时间:2019-04-30 04:44:29

标签: c++ boost icu boost-regex b2

我已经构建了icu 64.2(针对x86和x64进行调试和发布)。我的构建通过了所有测试,因此我知道不是icu的问题。

我还使用以下b2 build命令构建了Boost 1.70.0的64位版本:

b2 address-model=64 -sICU_PATH=C:\icu-release-64-2\icu4c threading=multi --build-type=complete --toolset=msvc-14.1 -j 6

b2正在检测我的icu构建并显示: -has_icu构建:是

当我尝试使用以下boost / regex / icu代码构建项目时:

bool is_valid_password(const icu::UnicodeString& password, const icu::UnicodeString& requirements)
{
    return boost::u32regex_match(password, boost::make_u32regex(requirements));
}

我收到以下错误:

1>------ Build started: Project: URLParser, Configuration: Debug x64 ------
1>URLParser.obj : error LNK2019: unresolved external symbol u_tolower_64 referenced in function "public: int __cdecl boost::icu_regex_traits::translate_nocase(int)const " (?translate_nocase@icu_regex_traits@boost@@QEBAHH@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2001: unresolved external symbol u_tolower_64
1>URLParser.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __cdecl icu_64::UnicodeString::length(void)const " (__imp_?length@UnicodeString@icu_64@@QEBAHXZ) referenced in function "class boost::basic_regex<int,class boost::icu_regex_traits> __cdecl boost::make_u32regex(class icu_64::UnicodeString const &,unsigned int)" (?make_u32regex@boost@@YA?AV?$basic_regex@HVicu_regex_traits@boost@@@1@AEBVUnicodeString@icu_64@@I@Z)
1>URLParser.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char16_t const * __cdecl icu_64::UnicodeString::getBuffer(void)const " (__imp_?getBuffer@UnicodeString@icu_64@@QEBAPEB_SXZ) referenced in function "class boost::basic_regex<int,class boost::icu_regex_traits> __cdecl boost::make_u32regex(class icu_64::UnicodeString const &,unsigned int)" (?make_u32regex@boost@@YA?AV?$basic_regex@HVicu_regex_traits@boost@@@1@AEBVUnicodeString@icu_64@@I@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol u_isblank_64 referenced in function "public: bool __cdecl boost::icu_regex_traits::isctype(int,unsigned __int64)const " (?isctype@icu_regex_traits@boost@@QEBA_NH_K@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol u_isspace_64 referenced in function "public: unsigned __int64 __cdecl boost::icu_regex_traits::lookup_classname(int const *,int const *)const " (?lookup_classname@icu_regex_traits@boost@@QEBA_KPEBH0@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol u_charType_64 referenced in function "public: bool __cdecl boost::icu_regex_traits::isctype(int,unsigned __int64)const " (?isctype@icu_regex_traits@boost@@QEBA_NH_K@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol u_charFromName_64 referenced in function "public: class std::vector<int,class std::allocator<int> > __cdecl boost::icu_regex_traits::lookup_collatename(int const *,int const *)const " (?lookup_collatename@icu_regex_traits@boost@@QEBA?AV?$vector@HV?$allocator@H@std@@@std@@PEBH0@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol u_digit_64 referenced in function "public: bool __cdecl boost::icu_regex_traits::isctype(int,unsigned __int64)const " (?isctype@icu_regex_traits@boost@@QEBA_NH_K@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl icu_64::Locale::Locale(void)" (__imp_??0Locale@icu_64@@QEAA@XZ) referenced in function "public: __cdecl boost::icu_regex_traits::icu_regex_traits(void)" (??0icu_regex_traits@boost@@QEAA@XZ)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl icu_64::Locale::Locale(class icu_64::Locale const &)" (__imp_??0Locale@icu_64@@QEAA@AEBV01@@Z) referenced in function "public: __cdecl boost::re_detail_107000::icu_regex_traits_implementation::icu_regex_traits_implementation(class icu_64::Locale const &)" (??0icu_regex_traits_implementation@re_detail_107000@boost@@QEAA@AEBVLocale@icu_64@@@Z)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl icu_64::Locale::Locale(class icu_64::Locale &&)" (__imp_??0Locale@icu_64@@QEAA@$$QEAV01@@Z) referenced in function "public: class icu_64::Locale __cdecl boost::basic_regex<int,class boost::icu_regex_traits>::getloc(void)const " (?getloc@?$basic_regex@HVicu_regex_traits@boost@@@boost@@QEBA?AVLocale@icu_64@@XZ)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl icu_64::Locale::~Locale(void)" (__imp_??1Locale@icu_64@@UEAA@XZ) referenced in function "public: __cdecl boost::icu_regex_traits::icu_regex_traits(void)" (??0icu_regex_traits@boost@@QEAA@XZ)
1>libboost_regex-vc141-mt-gd-x64-1_70.lib(icu.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class icu_64::Collator * __cdecl icu_64::Collator::createInstance(class icu_64::Locale const &,enum UErrorCode &)" (__imp_?createInstance@Collator@icu_64@@SAPEAV12@AEBVLocale@2@AEAW4UErrorCode@@@Z) referenced in function "public: __cdecl boost::re_detail_107000::icu_regex_traits_implementation::icu_regex_traits_implementation(class icu_64::Locale const &)" (??0icu_regex_traits_implementation@re_detail_107000@boost@@QEAA@AEBVLocale@icu_64@@@Z)
1>C:\Users\nicho\source\repos\URLParser\x64\Debug\URLParser.exe : fatal error LNK1120: 13 unresolved externals
1>Done building project "URLParser.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我还应该注意,我使用相同的编译器和MSVC工具集构建了icu和boost。有什么想法为什么boost不会链接到icu?

0 个答案:

没有答案