Boost library name missing version tag
I have built boost according to the documentation using:
bjam.exe toolset=msvc-9.0 variant=release link=shared stage
This gives me all libraries in the folder stage. I get 3 files for each boost package, for example:
boost_regex-vc90-mt-1_45.dll
boost_regex-vc90-mt-1_45.lib
boost_regex-vc90-mt.lib
What is the lib file without version tag? What is the difference between boost_regex-vc90-mt-1_45.lib and boost_regex-vc90-mt.lib ?
The boost documentation states the following:
"Extension: determined according to the operating system's usual convention. On most unix-style platforms the extensions are .a and .so for static libraries (archives) and shared libraries, respectively. On Windows, .dll indicates a shared library and .lib indicates a static or import library. Where supported by toolsets on unix variants, a full version extension is added (e.g. ".so.1.34") and a symbolic link to the library file, named without the trailing version number, will also be created." http://www.boost.org/doc/libs/1_45_0/more/getting_started/windows.html#library-namingThe file without a ver开发者_高级运维sion tag is a symbolic link to the library file? Symbolic links in windows? I do not understand.
I suppose it's a copy on windows. The build script attempts to do symbolic link as it would on unix, but because it's not supported on windows, it's defined as copy.
On unix, you normally have libboost_regex.so
as symlink to libboost_regex.so.1.45.0
. The compiler looks for the libboost_regex.so
, reads the link and stores the full name in the binary, so the dynamic linker than loads libboost_regex.so.1.45.0
for that program even when libboost_regex.so.1.46.0
, but new programs are linked against the latest version. The build script seems to try to emulate that behaviour on windows as much as possible.
精彩评论