Boost system 1.69.0 not header only?

末鹿安然 提交于 2019-12-11 06:08:13

问题


Boost system is a header only library since 1.69.0. However, linking against libboost_filesystem.so.1.69.0 gives these linker errors:

ld: libboost_system.so.1.69.0, needed by libboost_filesystem.so.1.69.0, not found (try using -rpath or -rpath-link)

which suggest that I still need to link against libboost_system.so, even though it is supposedly header only. Do I need to set some special flags when building Boost itself to get a truly header only system library?


回答1:


Boost system is now indeed header-only, but provides a stub for backward compatibility with projects that require such a library.

Boost.System is now header-only. A stub library is still built for compatibility, but linking to it is no longer necessary.

It may be that Boost FileSystem is not yet updated to remove the stub as indicated on line: https://github.com/boostorg/filesystem/blob/develop/build/Jamfile.v2#L29



来源:https://stackoverflow.com/questions/54184576/boost-system-1-69-0-not-header-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!