Frage

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?

War es hilfreich?

Lösung

Einige Boost-Bibliotheken sind nur Header-nur und ein anderes Objekt muss erstellt (System, Dateisystem, Grafik, MPI, Serialisierung usw.);Mehrere Boost-Bibliotheken können so konfiguriert sein, dass sie entweder Header-Only oder separat erstellt ist.

Die Vorteile von separat gebauten Libs sind ziemlich offensichtlich: Ihr eigenes Projekt kompiliert schneller und hängt von weniger externem Code ab.

Übrigens schauen Sie sich den folgenden Thread an: http:// steigern.22833326.N4.NABBLE.com / Lighweight-Header-Nur-Version-Version-of-Boost-FileSystem-TT3749876.HTML # Keiner

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top