Question

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?

Était-ce utile?

La solution

Certaines bibliothèques de boost sont uniquement d'en-tête et d'autres doivent être construites (système, système de fichiers, graphique, MPI, sérialisation, etc.);Plusieurs bibliothèques de boost peuvent être configurées pour être construites en-tête uniquement ou séparément.

Les avantages des libs construits séparément sont assez évidents: votre propre projet compile plus rapidement et dépend du code moins externe.

Au fait, jetez un coup d'œil au thread suivant: http:// boost.2283326.n4.n.non.com / Lighweight-Seul-Version-Version-Of-Boost-FileSystem-TT3749876.HTML # Aucun

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top