auto linking and 'system' layout
Hi, I attempted to use boost built with system layout (vc-7_1) to simplify deployment etc. Unfortunately, my code failed to link as the linker tried to link the date_time libraries with TOOLS and version marks (I'm not sure about other libraries as it was fatal enough:). Is this a known limitation of auto linking? Is there a workaround? I haven't search the documentation real thoroughly but no hints of how to turn auto linking off...:( TIA -- Serge
I attempted to use boost built with system layout (vc-7_1) to simplify deployment etc. Unfortunately, my code failed to link as the linker tried to link the date_time libraries with TOOLS and version marks (I'm not sure about other libraries as it was fatal enough:). Is this a known limitation of auto linking? Is there a workaround? I haven't search the documentation real thoroughly but no hints of how to turn auto linking off...:(
Excuse my ignorance, but what's "system layout" ? As far as turning auto-linking off, just define BOOST_ALL_NO_LIB as a project wide define and rebuild. You can keep auto-linking but change the toolset name by defining BOOST_TOOLSET to the required name when building, however there is unfortunately a known bug in the usage of this (doesn't work if you have more than one auto-linked lib included in the same TU), it's trivial to fix, but the issue wasn't spotted until 1.33 shipped :-( John.
John Maddock wrote:
I attempted to use boost built with system layout (vc-7_1) to simplify deployment etc. Unfortunately, my code failed to link as the linker tried to link the date_time libraries with TOOLS and version marks (I'm not sure about other libraries as it was fatal enough:). Is this a known limitation of auto linking? Is there a workaround? I haven't search the documentation real thoroughly but no hints of how to turn auto linking off...:(
Excuse my ignorance, but what's "system layout" ?
bjam option --layout=[versioned|system] If 'system', the libraries' names do not contain tool tag and version tag.
As far as turning auto-linking off, just define BOOST_ALL_NO_LIB as a project wide define and rebuild.
I've tried this but it seemed not to work at least for date_time:( I may be not insistent enough though..:)
You can keep auto-linking but change the toolset name by defining BOOST_TOOLSET to the required name when building, however there is unfortunately a known bug in the usage of this (doesn't work if you have more than one auto-linked lib included in the same TU), it's trivial to fix, but the issue wasn't spotted until 1.33 shipped :-(
The problem is that there's _no_ toolset tag in a library name in 'system' layout:( The idea was to have shorter'n'nicer dll/library names... -- Serge
Serge Skorokhodov wrote:
John Maddock wrote:
I attempted to use boost built with system layout (vc-7_1) to simplify deployment etc. Unfortunately, my code failed to link as the linker tried to link the date_time libraries with TOOLS and version marks (I'm not sure about other libraries as it was fatal enough:). Is this a known limitation of auto linking? Is there a workaround? I haven't search the documentation real thoroughly but no hints of how to turn auto linking off...:(
Excuse my ignorance, but what's "system layout" ?
bjam option --layout=[versioned|system] If 'system', the libraries' names do not contain tool tag and version tag.
Yep. That layout was designed in response to the request of the RedHat packagers. So it's not really intended for Windows.
You can keep auto-linking but change the toolset name by defining BOOST_TOOLSET to the required name when building,
The problem is that there's _no_ toolset tag in a library name in 'system' layout:( The idea was to have shorter'n'nicer dll/library names...
John, we may have to introduce a BOOST_IN_SYSTEM (or such) so that the autolink uses the system provided Boost install. It hasn't come up until now though. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
The problem is that there's _no_ toolset tag in a library name in 'system' layout:( The idea was to have shorter'n'nicer dll/library names...
John, we may have to introduce a BOOST_IN_SYSTEM (or such) so that the autolink uses the system provided Boost install. It hasn't come up until now though.
Oh shucks, not more macros please :-( I mean it's easy enough to do, whether it's worth supporting though I'm not sure yet. John.
I've tried this but it seemed not to work at least for date_time:( I may be not insistent enough though..:)
Well I've double checked and date_time *is* guarded by both BOOST_ALL_NO_LIB and BOOST_DATE_TIME_NO_LIB, so there must be some object files that you haven't rebuilt. You're linker error messages should tell you what those object files are I believe, but failing that make sure you clean *everything* and then do a full rebuild, don't skip any object files, shortcuts don't work :-) John.
Hi,
I've tried this but it seemed not to work at least for date_time:( I may be not insistent enough though..:)
Well I've double checked and date_time *is* guarded by both BOOST_ALL_NO_LIB and BOOST_DATE_TIME_NO_LIB, so there must be some object files that you haven't rebuilt. You're linker error messages should tell you what those object files are I believe, but failing that make sure you clean *everything* and then do a full rebuild, don't skip any object files, shortcuts don't work :-)
OK, thanks. It's a rather time-expensive experiment though, so I'm not sure I'm ready to repeat it right away. Still I pomise to do it in some days;). Just my five cents. I don't think that some macros are actually needed for allowing autolinking work in case of system install layout. Anyway, all library/dll names are pretty straitforward in this layout and traditional explicit linking isn't a problem. I would suggest just to document --layout option in getting started documentation section and state clearly that autolinking isn't intended to work in this layout (just because it is not needed) and actually it just won't work. So BOOST_ALL_NO_LIB etc. is a requirement if one wants to build in this layout. TIA -- Serge
John Maddock wrote:
Well I've double checked and date_time *is* guarded by both BOOST_ALL_NO_LIB and BOOST_DATE_TIME_NO_LIB, so there must be some object files that you haven't rebuilt. You're linker error messages should tell you what those object files are I believe, but failing that make sure you clean *everything* and then do a full rebuild, don't skip any object files, shortcuts don't work :-)
You're right it's my fault. A static library was built withour BOOST_ALL_NO_LIB. And it uses boost. So everything works, thanks. -- Serge
participants (3)
-
John Maddock
-
Rene Rivera
-
Serge Skorokhodov