Why does Boost::Filesystem have a binary portion?
-
11-12-2019 - |
Pregunta
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?
Solución
Algunas bibliotecas de refuerzo son solo de encabezado y otras necesidades de ser construidas (sistema, sistema de archivos, gráfico, MPI, serialización, etc.);Varias bibliotecas de refuerzo pueden configurarse para ser solo de encabezado o construido por separado.
Las ventajas de las libs de construcción por separado son bastante obvias: su propio proyecto se compila más rápido y depende de un código menos externo.
Por cierto, eche un vistazo al siguiente hilo: http:// Bost.2283326.N4.NABLE.COM / LIGHTHEAD-SOLO-SOLO-SOLO-VERSION-OF-BOOST-Filesystem-TT3749876.HTML # NINGUNO