Building Boost 1.70.0 с icu 64.2 - PullRequest
       73

Building Boost 1.70.0 с icu 64.2

1 голос
/ 30 апреля 2019

Я собрал icu 64.2 (отладка и выпуск для x86 и x64).Моя сборка проходит все тесты, поэтому я знаю, что проблема не в icu.

Я также собрал 64-разрядную версию boost 1.70.0, используя следующую команду сборки b2:

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 ==========

Я должен такжеобратите внимание, что я создал icu и boost с тем же компилятором и набором инструментов MSVC.Есть идеи, почему boost не будет ссылаться на icu?

...