-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve use-system-libc documentation #793
Comments
You need
|
Let me go ahead and expand on that a little (we'll need to explain this better in the docs anyway). So, MrDocs has the advantage of seeing everything a real compiler (clang) sees. The "disadvantage" (depending on how you look at it) is that the code has to be valid. A corollary of that is that dependencies have to be available. We discuss regular dependencies in the documentation but not system dependencies. For system dependencies, that's how the compiler works:
So, in this context, MrDocs uses The reason for that is reproducibility. You want to be able to build your documentation and don't want it to stop working because some platform details have changed. You want it to keep working even if the platform changes (for instance, we don't want builds to break when there are slight changes in the boost release tools). Disabling these options by default also helps avoid conflicts where the same symbol or header is defined twice: the compilation database includes some system paths relevant to one compiler (say MSVC), but that then breaks things when MrDocs attempts to compile it with clang. Although this gives us reproducibility, one inconvenience of this solution is that system headers (things like For many libraries, where there are no dependencies outside the standard libraries, the user won't even notice the difference. But code that depends on system libraries will need to handle that. So there are three solutions to this, and these solutions are in a continuum regarding
|
Well, that's coming from Asio, so ifdef-ing it out is not an option. |
Yes. There's no way around that. All we can do is document it. |
Version:
Source file:
Error:
Looks like
__linux__
is defined, but the headers are not there. Changinguse-system-stdlib: true
fixes it.The text was updated successfully, but these errors were encountered: