-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSA: Some boost libraries didn't compile #3
Comments
Boost.Asio and Boost.Beast are very heavy to compile, they are not representative of libraries that are in any way "fast." In order to use these libraries effectively (i.e. for them to have reasonable compilation times) users are required to be very mindful and meticulous about the physical structure of their declarations which use those library components. Type-erasure is must here, as exposing asio.hpp or beast.hpp in commonly included public headers will incur large compilation costs. The John Lakos book "Large-Scale C++ Software Design" is helpful in this context. |
Thanks @vinniefalco for the insights! They seem not a good fit for this overview then, and would probably dwarf the rest either way. |
Yeah, you could say that :) |
Yes it should work, but depending on how your build scripts are set up it might not. When including src.hpp (i.e. "header-only") you want Boost's "autolink" feature to be off. How do your build scripts include Boost.JSON? Are you using CMake? B2? |
I go in raw, i.e. call |
RAW!!! heh... anyway, try defining |
Hm that works "a bit": Works for a single TU. But when I interpreted the documentation correctly, the idea is to have one TU with #include <boost/json/src.hpp> and all others with: #include <boost/json.hpp> But with a second TU, the |
hmm I guess you have to also define |
That works, thanks for your help. I'm going to have to rerun all times because the baseline changed with the single |
Cool! Yeah, just remember that we care about the time for including |
I added |
Failed with:
Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. [...]
complained about a missing link file (
LINK : fatal error LNK1104: cannot open file 'libboost_container-vc142-mt-gd-x64-1_76.lib'
) although according to the manual this should be header-only.And with beast I have no idea what headers are usually used?
If any of those libs are of interests, I may look into it again.
The text was updated successfully, but these errors were encountered: