Pergunta

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?

Foi útil?

Solução

Algumas bibliotecas de impulso são apenas cabeçalhos e algumas outras necessidades de serem construídas (sistema, sistema de arquivos, gráfico, mpi, serialização, etc);Várias bibliotecas de impulso podem ser configuradas para serem cabeçalhadas apenas ou separadamente construídas.

As vantagens de libs construídos separadamente são bastante óbvios: seu próprio projeto compila mais rápido e depende de menos código externo.

By the way, dê uma olhada no seguinte thread: http:// boost.2283326.n4.nibble.com / LighWeight-Header-Somente-versão-de-Boost-FileSystem-TT3749876.html # nenhum

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top