I see.
Whether this will create problems with duplicate category instances depends on whether and how your program uses dynamic libraries that also use Boost.System and if so, whether these libraries under POSIX use hidden visibility. So, does that also mean that the problems with duplicate category instances caused by a scenario like above, will NOT occur if header-only approach is used in Boost 1.69 and later? Thanks,Ashish
On Tuesday, 26 October, 2021, 12:00:27 am IST, Peter Dimov
>Do you have to use Boost 1.66? System is header-only in Boost 1.69 and
later.
For the time being, yes. The update is not planned yet.
Is there a workaround that can be used in Boost 1.66 to achieve that? Or are there any consequences with the following approach that I'm thinking to use? :
-DBOOST_ERROR_CODE_HEADER_ONLY \ -DBOOST_SYSTEM_NO_DEPRECATED
Defining BOOST_ERROR_CODE_HEADER_ONLY is the correct way to switch Boost.System 1.66 to header-only mode. Whether this will create problems with duplicate category instances depends on whether and how your program uses dynamic libraries that also use Boost.System and if so, whether these libraries under POSIX use hidden visibility.