mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-24 14:15:11 +00:00
docs: clarify requirements for including pybind11 (#5326)
* DOC: Clarify requirements for including pybind11 Inherited from requirements for including Python.h Closes #4999 * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
9966ad409d
commit
efa2b20d69
@ -78,6 +78,13 @@ For brevity, all code examples assume that the following two lines are present:
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
.. note::
|
||||
|
||||
``pybind11/pybind11.h`` includes ``Python.h``, as such it must be the first file
|
||||
included in any source file or header for `the same reasons as Python.h`_.
|
||||
|
||||
.. _`the same reasons as Python.h`: https://docs.python.org/3/extending/extending.html#a-simple-example
|
||||
|
||||
Some features may require additional headers, but those will be specified as needed.
|
||||
|
||||
.. _simple_example:
|
||||
|
Loading…
Reference in New Issue
Block a user