Вопрос

Out of intellectual curiosity, I was wondering why the boost::filesystem library had a compiled component, while in other cases no compiled components are necessary. What is in the compiled portion that can not be in a hpp?

What really confuses me is that on my computer I compile this portion anyway (before using the library), and I would thus expect it to be possible or even preferred to perform the same compilation I did in BJam every time I build my application.

Why is there the additional .so/.a file?

Это было полезно?

Решение

Некоторые библиотеки усиления являются только заголовками, а некоторые другие должны быть построены (система, файловая система, граф, MPI, сериализация и т. Д.);Несколько библиотек BOOST могут быть настроены только для заголовка или построены отдельно.

Преимущества построенные отдельно построенные libs довольно очевидно: ваш собственный проект компилирует быстрее и зависит от менее внешнего кода.

Кстати, взгляните на следующую тему: http:// boost.2283326.N4.NABLE.COM / Lighweight-заголовок - только версия-of-Boost-fileSystem-tt3749876.html # none

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top