本文介绍了Boost系统1.69.0不仅是标题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Boost系统从1.69.0开始是仅标头的库.但是,针对 libboost_filesystem.so.1.69.0 进行链接会产生以下链接器错误:

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)

这表明我仍然需要链接到 libboost_system.so ,即使它据说只是标头.在构建Boost本身时,是否需要设置一些特殊标志以获得真正的仅头文件系统库?

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?

推荐答案

Boost系统现在确实仅是标头,但是提供了存根,以便与需要这种库的项目向后兼容.

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

Boost FileSystem可能尚未更新以删除行上所示的存根: https://github.com/boostorg/filesystem/blob/develop/build/Jamfile.v2#L29

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

这篇关于Boost系统1.69.0不仅是标题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 09:50