Thank you very much for your confirmation, example and insight how this works.
Indeed, using boost 1.72 and making sure that the ICU release and debug builds are found
created the needed static library.
In my case there was an additional trap, not sure if I accidentally created it myself, that it
was looking for icu lib64 and bin64 directories but mine were created being lib and bin.
But a look into config.log revealed it quite soon.

Thank you
Eren

Am Mi., 26. Feb. 2020 um 21:29 Uhr schrieb John Maddock via Boost-users <boost-users@lists.boost.org>:

On 26/02/2020 19:09, Eko palypse via Boost-users wrote:
> I'm confused about the different post I've found on the web therefore
> would appreciate
> if someone could answer if it is possible to build a static regex
> library with ICU support on windows?

Yes of course, the trick is to tell b2 where to find ICU, using the
latest ICU x64 release I just built with ICU support and:

cd boost-root-directory.

./b2 --reconfigure -a --with-regex -sICU_PATH='D:\some-path\icu-65.1' 
address-model=64 --build-type=complete

The --reconfigure -a options are only required if you have a
stale/failed build already lurking on your HD.

Note that this assumes that you have both debug and release builds of
ICU available - if you downloaded the ICU binaries they only provide
release builds, and the above will fail and you will see ICU not
detected and a message:

     - has_icu builds           : no

You can find out what went wrong by inspecting
boost-root/bin.v2/config.txt, but in this telling the build script what
names the ICU binaries have fixed things:

./b2 --reconfigure --with-regex -sICU_PATH='D:\some-path\icu-65.1'
-sICU_ICUIN_NAME=icuin -sICU_ICUUC_NAME=icuuc -j6 address-model=64
--build-type=complete

Note that these options require Boost-1.72.

And finally.... for all Boost releases, please remember that Boost.Regex
is "just a bunch of source files", you can always build everything in
libs/regex/src/*.cpp as a static library using whatever build system and
compiler you wish - there is no great magic going on.  For msvc you will
need to define BOOST_REGEX_NO_LIB when using a custom built binary to
avoid the auto-linking kicking in and looking for a specifically named
binary.  And also define BOOST_HAS_ICU when building the binary so it
includes ICU support.

HTH, John.

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users