Boost.Regex and static ICU libraries
Hello, The ICU4C readme says that the define U_STATIC_IMPLEMENTATION should be defined in user code that links against ICU's static libraries. Grepping the entire Boost, I do not see it. Is linking against ICU static libraries supported at all and if yes, where is the best place to define this macro when building Boost.Regex? _________________________________________________________________ Сдобий се със следващата генерация Windows Live услуги сега! http://get.live.com
a86yes wrote:
Hello,
The ICU4C readme says that the define U_STATIC_IMPLEMENTATION should be defined in user code that links against ICU's static libraries. Grepping the entire Boost, I do not see it. Is linking against ICU static libraries supported at all and if yes, where is the best place to define this macro when building Boost.Regex?
It would have to be defined globally for all source files in the project, you could build with something like: bjam toolset-name --with-regex define=U_STATIC_IMPLEMENTATION=1 link=static Or else add the define to boost/regex/user.hpp HTH, John.
Thank you very much for the prompt reply and providing a concrete example. I too reasoned that whole-project define would be necessary, but wasn't sure if the combination of ICU static libs and Boost.Regex was really supported and what was the best place to introduce this define to Boost (as it is a complex project and its build system is somewhat nonstandard). Now I have a more general question, not necessarily connected with Boost.Regex. I searched for such Bjam information, but couldn't easily find anything, so I thought I'd use this opportunity to ask. On a related note, if what is to be built using the bjam command that you kindly provided below is not just the Boost.Regex project but the entire Boost, is there a way to confine the definition to the Boost.Regex-related parts? This is to avoid any possible unwanted side-effects in other Boost projects also expecting this particular definition (of course, this is very highly unlikely, but maybe Boost is complex enough, so it's good to aim to avoid such a possibility). As you have kindly written, one can edit boost/regex/user.hpp. This would produce the desired result -- confining the define only to the Boost.Regex related parts even when the entire Boost is built. But considering that editing source code should be avoided if possible, is there another way? Providing an extra bjam configuration file or something like this? As I said, the above is also a general question, not only specific to the regex library -- how to conveniently and non-intrusively define something when building the entire Boost, so that the definition is confined only to a particular Boost sub-project/library.
From: john@johnmaddock.co.uk To: boost-users@lists.boost.org Date: Fri, 14 Mar 2008 18:11:06 +0000 Subject: Re: [Boost-users] Boost.Regex and static ICU libraries
a86yes wrote:
Hello,
The ICU4C readme says that the define U_STATIC_IMPLEMENTATION should be defined in user code that links against ICU's static libraries. Grepping the entire Boost, I do not see it. Is linking against ICU static libraries supported at all and if yes, where is the best place to define this macro when building Boost.Regex?
It would have to be defined globally for all source files in the project, you could build with something like:
bjam toolset-name --with-regex define=U_STATIC_IMPLEMENTATION=1 link=static
Or else add the define to boost/regex/user.hpp
HTH, John.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_________________________________________________________________ Сдобий се със следващата генерация Windows Live услуги сега! http://get.live.com
Now I have a more general question, not necessarily connected with Boost.Regex. I searched for such Bjam information, but couldn't easily find anything, so I thought I'd use this opportunity to ask.
On a related note, if what is to be built using the bjam command that you kindly provided below is not just the Boost.Regex project but the entire Boost, is there a way to confine the definition to the Boost.Regex-related parts? This is to avoid any possible unwanted side-effects in other Boost projects also expecting this particular definition (of course, this is very highly unlikely, but maybe Boost is complex enough, so it's good to aim to avoid such a possibility). As you have kindly written, one can edit boost/regex/user.hpp. This would produce the desired result -- confining the define only to the Boost.Regex related parts even when the entire Boost is built. But considering that editing source code should be avoided if possible, is there another way? Providing an extra bjam configuration file or something like this?
Passing --with-regex restricts the build to just Boost.Regex, while --without-regex would build everything except Boost.Regex. This should all be listed along with all the other options if you do a bjam --help in the Boost root directory. HTH, John.
participants (2)
-
a86yes
-
John Maddock