Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
2e03a585
Commit
2e03a585
authored
Apr 14, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added comment about cmake issues (#99)
parent
b282595b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
+21
-1
docs/faq.rst
+21
-1
No files found.
docs/faq.rst
View file @
2e03a585
...
@@ -48,7 +48,7 @@ binding ``increment`` or ``increment_ptr`` will also create Python functions
...
@@ -48,7 +48,7 @@ binding ``increment`` or ``increment_ptr`` will also create Python functions
that don't modify their arguments.
that don't modify their arguments.
Although inconvenient, one workaround is to encapsulate the immutable types in
Although inconvenient, one workaround is to encapsulate the immutable types in
a custom type that does allow modifications.
a custom type that does allow modifications.
An other alternative involves binding a small wrapper lambda function that
An other alternative involves binding a small wrapper lambda function that
returns a tuple with all output arguments (see the remainder of the
returns a tuple with all output arguments (see the remainder of the
...
@@ -64,6 +64,25 @@ and the binding code
...
@@ -64,6 +64,25 @@ and the binding code
m.def("foo", [](int i) { int rv = foo(i); return std::make_tuple(rv, i); });
m.def("foo", [](int i) { int rv = foo(i); return std::make_tuple(rv, i); });
CMake doesn't detect the right Python version, or it finds mismatched interpreter and library versions
======================================================================================================
The Python detection logic of CMake is flawed and can sometimes fail to find
the desired Python version, or it chooses mismatched interpreter and library
versions. A longer discussion is available on the pybind11 issue tracker
[#f1]_, though this is ultimately not a pybind11 issue.
To force the build system to choose a particular version, delete CMakeCache.txt
and then invoke CMake as follows:
.. code-block:: bash
cmake -DPYTHON_EXECUTABLE:FILEPATH=<...> \
-DPYTHON_LIBRARY:FILEPATH=<...> \
-DPYTHON_INCLUDE_DIR:PATH=<...> .
.. [#f1] http://github.com/pybind/pybind11/issues/99
Working with ancient Visual Studio 2009 builds on Windows
Working with ancient Visual Studio 2009 builds on Windows
=========================================================
=========================================================
...
@@ -77,3 +96,4 @@ Common gotchas to watch out for involve not ``free()``-ing memory region
...
@@ -77,3 +96,4 @@ Common gotchas to watch out for involve not ``free()``-ing memory region
that that were ``malloc()``-ed in another shared library, using data
that that were ``malloc()``-ed in another shared library, using data
structures with incompatible ABIs, and so on. pybind11 is very careful not
structures with incompatible ABIs, and so on. pybind11 is very careful not
to make these types of mistakes.
to make these types of mistakes.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment